var x,y,m:array[1..100] of longint;
k:array[1..100] of double;
i,j,n,ans,tot:longint;
begin
assign(input,'asm_fuel.in');
reset(input);
assign(output,'asm_fuel.out');
rewrite(output);
readln(n);
for i:=1 to n do
begin
readln(x[i],y[i]);
if x[i]=0 then
begin
if y[i]=0 then
k[i]:=-100000
else
k[i]:=100000;
end
else
k[i]:=y[i]/x[i];
end;
for i:=1 to n do
if k[i]<>-100000 then
for j:=1 to n do
if k[i]=k[j] then m[i]:=m[i]+1;
for i:=1 to n do
if m[i]>ans then ans:=m[i];
for i:=1 to n do
if k[i]=-100000 then ans:=ans+1;
for i:=1 to n do
begin
tot:=0;
for j:=1 to n do
if (i<>j)and(x[i]=x[j]) then tot:=tot+1;
if tot>ans then ans:=tot;
end;
tot:=0;
for i:=1 to n do
begin
tot:=0;
for j:=1 to n do
if (i<>j)and(y[i]=y[j]) then tot:=tot+1;
if tot>ans then ans:=tot;
end;
writeln(ans);
close(input);
close(output);
end.