import java.util.*; class convexhull { static final double EPSILON = 0.000001; static final int MAXPOLY = 200; static Point first_point = new Point(); static class Point { double x,y; } static class Polygon { Point p[] = new Point[MAXPOLY]; int n; Polygon() { for(int i=0;i EPSILON; } static boolean collinear(Point a, Point b, Point c) { return Math.abs(signed_triangle_area(a,b,c)) <= EPSILON; } static double distance(Point a, Point b) { int i; double d = (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y); return Math.sqrt(d); } static Point copy_point(Point p) { Point ret = new Point(); ret.x = p.x; ret.y = p.y; return ret; } static Polygon convex_hull(Point in[], int n) { Polygon hull = new Polygon(); int top; if(n<=3) { for(int i=0;i p2.x) return 1; if(p1.y < p2.y) return -1; if(p1.y > p2.y) return 1; return 0; } }); oldn = n; int ret = n; hole = 1; for(i=1;i