n = int(input()) l = [list(map(int, input().split()))for i in range(n)] nux = 0 for i in range(1, 101): for j in range(101): num = 0 for x in range(101): y = i*x+j if [x, y] in l: num += 1 nux = max(nux, num) for j in range(101): num = 0 for i in range(n): if l[i][0] == j: num += 1 nux = max(nux, num) print(nux)