import math from collections import defaultdict n = int(input()) points = [tuple(map(int, input().split())) for _ in range(n)] if n <= 1: print(n) exit() max_res = 0 for i in range(n): xi, yi = points[i] slope_counts = defaultdict(int) for j in range(n): if i == j: continue xj, yj = points[j] dx = xj - xi dy = yj - yi g = math.gcd(abs(dx), abs(dy)) if g == 0: dx_g = 0 dy_g = 0 else: dx_g = dx // g dy_g = dy // g # Normalize the direction if dx_g == 0: # Vertical line, ensure dy is positive if dy_g < 0: dy_g = -dy_g else: if dx_g < 0: dx_g = -dx_g dy_g = -dy_g slope = (dx_g, dy_g) slope_counts[slope] += 1 current_max = 0 if slope_counts: current_max = max(slope_counts.values()) max_res = max(max_res, current_max + 1) # include the current point i print(max_res)