#include #include #define MAX_P 100001 typedef struct pt_typ { short int x,y; } pt; pt points[MAX_P]; int P; int pt_cmp(const void *e1,const void *e2) { if (((pt *)e1)->x < ((pt *)e2)->x) return -1; if (((pt *)e1)->x > ((pt *)e2)->x) return 1; if (((pt *)e1)->y < ((pt *)e2)->y) return -1; if (((pt *)e1)->y > ((pt *)e2)->y) return 1; return 0; } int main(void) { int i,j; unsigned long sum; while (scanf("%d",&P),P) { sum=0; for (i=0;i