#include #include #include #include using namespace std; const double EPS=1e-8; const double pi=3.1415926535897932384626; struct TPoint { int type; // 0=left, 1=right double angle; // Between 0 and 2*pi int ix; TPoint(int a, double b, int c) : type(a),ix(c) { angle=fmod(b+2*pi,2*pi); } }; bool operator<(const TPoint &a, const TPoint &b) { if (fabs(a.angle-b.angle)>EPS) return a.angle> N; while (N--) { cin >> n >> d; vector v; for(int i=m=0;i> x >> y; if (x*x+y*y-EPS mark(m,false); vector list; for(int k=0;k