public static void main(String[] args) {
	    Fast fast = new Fast();

        StdDraw.setXscale(0, 32768);
        StdDraw.setYscale(0, 32768);
        StdDraw.show(0);

        String filename = args[0];
        In in = new In(filename);
        int N = in.readInt();
        
        Point[] points = new Point[N];
        
        for (int i = 0; i < N; i++) {
            int x = in.readInt();
            int y = in.readInt();
            Point p = new Point(x, y);
            points[i] = p;
            p.draw();
        }
        
        SlopePair[] slopes = new SlopePair[N];
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < N; j++) {
//            	http://stackoverflow.com/questions/70324/java-inner-class-and-static-nested-class
                slopes[j] = fast.new SlopePair();
                slopes[j].index = j;
                slopes[j].slope = points[i].slopeTo(points[j]);

            }
            sort(slopes, N);
            
            int lo = 1; int hi = 1;
            while (hi < N-1) {
                while (slopes[lo].slope == slopes[hi].slope) {
                    if (hi < N-1) hi++;
                    if (hi == N-1) break;
                }
                if (hi - lo >= 3) {
                    StdOut.print(points[i].toString());
                    for (int t = lo; t < hi; t++) {
                        StdOut.print(" -> " + points[slopes[t].index]);
                    }
                    StdOut.println();
                    points[i].drawTo(points[slopes[hi - 1].index]);
                }
                lo = hi;
            }
        }
        StdDraw.show(0);
    }