import java.io.*; import java.util.*; public class ConvexHull { public static long cross(Point O,Point A,Point B) { return (A.x - O.x) * (B.y - O.y) - (A.y - O.y) * (B.x - O.x); } public static Point[] convex_hull(Point[] P){ if (P.length > 1){ int n = P.length, k = 0; Point[] H = new Point[2 * n]; Arrays.sort(P); // Build lower hull for (int i=0;i= 2 && cross(H[k - 2],H[k - 1],P[i]) <= 0) k--; H[k++] = P[i]; } // Build upper hull for (int i=n-2,t=k+1;i>=0;i--){ while (k >= t && cross(H[k - 2],H[k - 1],P[i]) <= 0) k--; H[k++] = P[i]; } if (k > 1) H = Arrays.copyOfRange(H,0,k-1); return H; } return P; } public static void main(String[] args) throws IOException { Scanner sc = new Scanner(new File(args[0])); int n = sc.nextInt(); Point[] p = new Point[n]; int xMin = 99999; int xMax = 0; int yMin = 99999; int yMax = 0; double pointSize = 0.1; for (int i=0;i