public static void main(String[] args) {
    Random rnd = new Random();

    for (int times = 0; times < 100; ++times) {
      System.out.println(times);
      int n;
      if (args.length == 1) {
        n = Integer.parseInt(args[0]);
      } else {
        n = rnd.nextInt(1000 - 1) + 1;
      }
      ArrayList<Point> points = new ArrayList<Point>();
      HashSet<Point> t = new HashSet<Point>();
      do {
        Point p = new Point(rnd.nextInt(999), rnd.nextInt(999));
        if (!t.contains(p)) {
          points.add(p);
          t.add(p);
        }
      } while (t.size() < n);
            
      /*
        for (int i = 0; i < points.size(); i++)
        {
        System.out.println(points.get(i).x + ", " + points.get(i).y);
        }
      */
      Line l = find_line_with_most_points(points);
      System.out.println(l.getSlope().first + " " + l.getSlope().second + " " + l.getIntercept().first + " " + l.getIntercept().second);
    }
  }