import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
#mod = 10 ** 9 + 7 
mod = 998244353
from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10

N = INT()
xy = [LIST() for _ in range(N)]

if N == 1:
	print(1)
	exit()

xy.sort(key = lambda x: (x[0], x[1]))
diff = []

for s, t in combinations(xy, 2):
	st = str(t[0]-s[0]) + " " +str(t[1]-s[1])
	diff.append(st)

print(max(N - Counter(diff).most_common()[0][1], 1))
 import sys, re sys re from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby from operator import itemgetter, mul from copy import deepcopy from string import ascii_lowercase, ascii_uppercase, digits from bisect import bisect, bisect_left, insort, insort_left from heapq import heappush, heappop from functools import reduce def input(): return sys.stdin.readline().strip() input def INT(): return int(input()) INT def MAP(): return map(int, input().split()) MAP def LIST(): return list(map(int, input().split())) LIST MAP() for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) MAP() MAP def ZIP(n): return zip(*(MAP() for _ in range(n))) ZIP n n sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = float('inf') INF float('inf') float 'inf' mod = 998244353 mod 998244353 from decimal import * N = INT() N INT() INT LIST() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) LIST() LIST xy = [LIST() for _ in range(N)] xy [LIST() for _ in range(N)] if N == 1:
	print(1)
	exit() N == 1 N 1 print(1) print 1 exit() exit xy.sort(key = lambda x: (x[0], x[1])) xy.sort xy sort key = lambda x: (x[0], x[1]) key lambda x: (x[0], x[1]) (x[0], x[1]) x[0] x 0 x[1] x 1 x diff = [] diff [] for s, t in combinations(xy, 2):
	st = str(t[0]-s[0]) + " " +str(t[1]-s[1])
	diff.append(st) s t combinations(xy, 2) combinations xy 2 st = str(t[0]-s[0]) + " " +str(t[1]-s[1]) st str(t[0]-s[0]) + " " +str(t[1]-s[1]) str(t[0]-s[0]) + " " str(t[0]-s[0]) str t[0]-s[0] t[0] t 0 s[0] s 0 " " str(t[1]-s[1]) str t[1]-s[1] t[1] t 1 s[1] s 1 diff.append(st) diff.append diff append st print(max(N - Counter(diff).most_common()[0][1], 1)) print max(N - Counter(diff).most_common()[0][1], 1) max N - Counter(diff).most_common()[0][1] N Counter(diff).most_common()[0][1] [0] (diff).most_common() (diff).most_common (diff) Counter diff most_common 0 1 1 def MAP(): return map(int, input().split()) def MAP(): return map(int, input().split()) MAP def LIST(): return list(map(int, input().split())) def LIST(): return list(map(int, input().split())) LIST def ZIP(n): return zip(*(MAP() for _ in range(n))) def ZIP(n): return zip(*(MAP() for _ in range(n))) ZIP mod = 998244353 998244353 mod N = INT() INT() N st = str(t[0]-s[0]) + " " +str(t[1]-s[1]) str(t[0]-s[0]) + " " +str(t[1]-s[1]) st def INT(): return int(input()) def INT(): return int(input()) INT xy = [LIST() for _ in range(N)] [LIST() for _ in range(N)] xy diff = [] [] diff def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input INF = float('inf') float('inf') INF
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
#mod = 10 ** 9 + 7 
mod = 998244353
from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10

N = INT()
xy = [LIST() for _ in range(N)]

if N == 1:
	print(1)
	exit()

xy.sort(key = lambda x: (x[0], x[1]))
diff = []

for s, t in combinations(xy, 2):
	st = str(t[0]-s[0]) + " " +str(t[1]-s[1])
	diff.append(st)

print(max(N - Counter(diff).most_common()[0][1], 1))

