// Maximum-TNT #include #include #include #include #include #include #include #include #include #include using namespace std; #define cin fin const int BUFSIZE = 1024; ifstream fin("inside.txt"); typedef complex cmp_t; #define re real() #define im imag() const double ERROR = 1e-10; vector g_poly; int g_m, g_n; double Gaiseki(cmp_t a, cmp_t b) { return a.re * b.im - b.re * a.im; } bool IsInside(vector &poly, cmp_t p) { int n = poly.size(); int i; for(i=1;i> g_n >> g_m; if(g_n == 0 && g_m == 0) return false; g_poly.assign(g_n, cmp_t()); for(int i=0;i> x >> y; g_poly[i] = cmp_t(x, y); } g_poly.push_back(g_poly.front()); return true; } int Solve() { int total = 0; for(int i=0;i> x >> y; total += IsInside(g_poly, cmp_t(x, y)); } return total; } int main() { int casenum = 1; while(Input()) { cout << "Data set " << casenum++ << ": " << Solve() << endl; } return 0; }