import sys
from collections import Counter
input = sys.stdin.readline
N = int(input())
xy = [tuple([int(i) for i in input().split()]) for _ in range(N)]
ary = []
if N == 1:
    print(1)
    exit()
for i, t in enumerate(xy[:-1]):
    x = t[0]
    y = t[1]
    for x2, y2 in xy[i+1:]:
        ary.append((x2-x, y2-y))
        ary.append((x-x2, y-y2))
c = dict(Counter(ary))
print(N-max(c.values())) import sys sys from collections import Counter input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline N = int(input()) N int(input()) int input() input tuple([int(i) for i in input().split()]) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) tuple([int(i) for i in input().split()]) tuple [int(i) for i in input().split()] xy = [tuple([int(i) for i in input().split()]) for _ in range(N)] xy [tuple([int(i) for i in input().split()]) for _ in range(N)] ary = [] ary [] if N == 1:
    print(1)
    exit() N == 1 N 1 print(1) print 1 exit() exit for i, t in enumerate(xy[:-1]):
    x = t[0]
    y = t[1]
    for x2, y2 in xy[i+1:]:
        ary.append((x2-x, y2-y))
        ary.append((x-x2, y-y2)) i t enumerate(xy[:-1]) enumerate xy[:-1] xy :-1 -1 x = t[0] x t[0] t 0 y = t[1] y t[1] t 1 for x2, y2 in xy[i+1:]:
        ary.append((x2-x, y2-y))
        ary.append((x-x2, y-y2)) x2 y2 xy[i+1:] xy i+1: i+1 i 1 ary.append((x2-x, y2-y)) ary.append ary append (x2-x, y2-y) x2-x x2 x y2-y y2 y ary.append((x-x2, y-y2)) ary.append ary append (x-x2, y-y2) x-x2 x x2 y-y2 y y2 c = dict(Counter(ary)) c dict(Counter(ary)) dict Counter(ary) Counter ary print(N-max(c.values())) print N-max(c.values()) N max(c.values()) max c.values() c.values c values ary = [] [] ary N = int(input()) int(input()) N xy = [tuple([int(i) for i in input().split()]) for _ in range(N)] [tuple([int(i) for i in input().split()]) for _ in range(N)] xy c = dict(Counter(ary)) dict(Counter(ary)) c x = t[0] t[0] x y = t[1] t[1] y input = sys.stdin.readline sys.stdin.readline input
import sys
from collections import Counter
input = sys.stdin.readline
N = int(input())
xy = [tuple([int(i) for i in input().split()]) for _ in range(N)]
ary = []
if N == 1:
    print(1)
    exit()
for i, t in enumerate(xy[:-1]):
    x = t[0]
    y = t[1]
    for x2, y2 in xy[i+1:]:
        ary.append((x2-x, y2-y))
        ary.append((x-x2, y-y2))
c = dict(Counter(ary))
print(N-max(c.values()))
