#!/usr/bin/env python3
from collections import defaultdict

(n, ), *p = [[*map(int, i.split())] for i in open(0)]
d = defaultdict(int)
for i in range(n):
    for j in range(n):
        if i != j:
            d[(p[i][0] - p[j][0], p[i][1] - p[j][1])] += 1
print(n*(n<2) or n - max(d.values())) from collections import defaultdict [*map(int, i.split())] for i in open(0) for i in open(0) i open(0) open 0 for i in open(0) [*map(int, i.split())] *map(int, i.split()) map(int, i.split()) map int i.split() i.split i split (n, ), *p = [[*map(int, i.split())] for i in open(0)] n [[*map(int, i.split())] for i in open(0)] *p p d = defaultdict(int) d defaultdict(int) defaultdict int for i in range(n):
    for j in range(n):
        if i != j:
            d[(p[i][0] - p[j][0], p[i][1] - p[j][1])] += 1 i range(n) range n for j in range(n):
        if i != j:
            d[(p[i][0] - p[j][0], p[i][1] - p[j][1])] += 1 j range(n) range n if i != j:
            d[(p[i][0] - p[j][0], p[i][1] - p[j][1])] += 1 i != j i j d[(p[i][0] - p[j][0], p[i][1] - p[j][1])] += 1 d[(p[i][0] - p[j][0], p[i][1] - p[j][1])] d (p[i][0] - p[j][0], p[i][1] - p[j][1]) p[i][0] - p[j][0] p[i][0] [i] p i 0 p[j][0] [j] p j 0 p[i][1] - p[j][1] p[i][1] [i] p i 1 p[j][1] [j] p j 1 1 print(n*(n<2) or n - max(d.values())) print n*(n<2) or n - max(d.values()) n*(n<2) n n<2 n 2 n - max(d.values()) n max(d.values()) max d.values() d.values d values d = defaultdict(int) defaultdict(int) d n, ), *p = [[*map(int, i.split())] for i in open(0)] [[*map(int, i.split())] for i in open(0)] n
#!/usr/bin/env python3
from collections import defaultdict

(n, ), *p = [[*map(int, i.split())] for i in open(0)]
d = defaultdict(int)
for i in range(n):
    for j in range(n):
        if i != j:
            d[(p[i][0] - p[j][0], p[i][1] - p[j][1])] += 1
print(n*(n<2) or n - max(d.values()))
