// Arup Guha
// 9/18/04
// Alternate Solution using brute force for lineup problem in 9/18 
// programming team practice.
// Took 3:19 on eola on the judge data.

#include <iostream.h>
#include <fstream.h>

int collinear(int pt1[], int pt2[], int pt3[]);

void main() {

  ifstream fin("lineup.in");
  int numpts, setnum=1;

  // Read through each input set.
  while (fin >> numpts) {

    int points[700][2];

    // Read in all the points.
    for (int i=0; i<numpts; i++) 
      fin >> points[i][0] >> points[i][1];


    int max = 2;

    // Loop through each combination of pairs of points.
    for (int i=0; i<numpts; i++) {
      for (int j=i+1; j<numpts; j++) {

        int count = 2;

        // For the pair points[i], points[j], find other collinear pts.
        for (int k=j+1; k<numpts; k++)
          if (collinear(points[i], points[j], points[k]))
            count++;

        // Update the maximum if necessary.
        if (count > max)
          max = count;
      }
    }

    // Output results.
    cout << endl;
    cout << "Set #" << setnum << endl;
    cout << max << endl;
    setnum++;
  }

}

// Return 1 if the three points are collinear 0, otherwise.
int collinear(int pt1[], int pt2[], int pt3[]) {

  // Three points form a vertical line.
  if (pt1[0] == pt2[0] && pt2[0] == pt3[0])
    return 1;

  // Only two of the three points form a vertical line.
  else if (pt1[0] == pt2[0] || pt1[0] == pt3[0] || pt2[0] == pt3[0])
    return 0;

  // Three points form a non-vertical line.
  else if ((double)(pt1[1]-pt2[1])/(pt1[0]-pt2[0]) ==
           (double)(pt2[1]-pt3[1])/(pt2[0]-pt3[0]))
    return 1;

  // If we get here, the points are not collinear.
  return 0;
}
