#include <bits/stdc++.h>
#define INT long long int
using namespace std;

char infile[100], outfile[100];

map <pair<int,int>, int> A;

int gcd(int a,int b){
    int c;
    
    if(a<0) a = a*(-1);
    if(b<0) b = b*(-1);
    if(a==0 or b==0) return a+b;
    while(a*b>0){
        c = b;
        b = a%b;
        a = c;
    }
    return a+b;
}
int main() {
    int I,n, i, a, b, m=0, d, x, y,c;
    srand(time(NULL));
    //cin >> T;
    for(I=51;I<=55; I++){
    	A.clear();
    	m = 0;
    	//x = rand()%1001;
    	//y = rand()%1001;
    	x=y=0;
    	sprintf(infile, ".%d.in", I);
	    freopen(infile, "w", stdout);
	    //cin >> n;
	    n = rand()%101+99900;
	    cout << x<<" "<< y <<" "<< n << endl;
	    for(i=0;i<n;i++){
	        //cin >> a >> b;
	        a = 1000-rand()%2001;
	        //b = rand()%1001;
	        b = 1000-rand()%2001;
	        while(a==0 and b==0){
        	 	a = 1000-rand()%2001;
	        	b = 1000-rand()%2001;
			}    
			if(rand()%2==0 or a==0){
				a = 0;
			}else{
				b = 0;
			}
			if(a==0 and b==0){
				a = 1;
			}
	        cout << a << " ";
	        cout << b << endl;
	        
	        a = a-x;
        	b = b-y;
        	d = gcd(a,b);
        	a = a/d;
        	b = b/d;
        	
	        A[{a,b}]++;
	        if(m<A[{a,b}])m=A[{a,b}];
	    }
	    sprintf(infile, ".%d.out", I);
	    freopen(infile, "w", stdout);
	    cout << m;
	}
    return 0;
}
