# https://atcoder.jp/contests/diverta2019-2/tasks/diverta2019_2_b


from itertools import combinations
from collections import defaultdict

N = int(input())
points = [tuple(map(int, input().split())) for _ in range(N)]

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

# points.sort()  # 先にソートしておくと大小関係の処理が楽

cnts = defaultdict(lambda: 0)
for pa, pb in combinations(points, 2):
    dx = pa[0] - pb[0]
    dy = pa[1] - pb[1]
    if dx < 0:  # 事前にソートしておくとココらへんの処理がいらなくなるよ
        dx *= -1
        dy *= -1
    if dx == 0:
        dy = max(dy, -dy)
    if dy == 0:
        dx = max(dx, -dx)
    cnts[(dx, dy)] += 1

print(N - max(cnts.values())) from itertools import combinations from collections import defaultdict N = int(input()) N int(input()) int input() input tuple(map(int, input().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split points = [tuple(map(int, input().split())) for _ in range(N)] points [tuple(map(int, input().split())) for _ in range(N)] if N == 1:
    print(1)
    exit()

# points.sort()  # 先にソートしておくと大小関係の処理が楽 N == 1 N 1 print(1) print 1 exit() exit cnts = defaultdict(lambda: 0) cnts defaultdict(lambda: 0) defaultdict lambda: 0 0 for pa, pb in combinations(points, 2):
    dx = pa[0] - pb[0]
    dy = pa[1] - pb[1]
    if dx < 0:  # 事前にソートしておくとココらへんの処理がいらなくなるよ
        dx *= -1
        dy *= -1
    if dx == 0:
        dy = max(dy, -dy)
    if dy == 0:
        dx = max(dx, -dx)
    cnts[(dx, dy)] += 1 pa pb combinations(points, 2) combinations points 2 dx = pa[0] - pb[0] dx pa[0] - pb[0] pa[0] pa 0 pb[0] pb 0 dy = pa[1] - pb[1] dy pa[1] - pb[1] pa[1] pa 1 pb[1] pb 1 if dx < 0:  # 事前にソートしておくとココらへんの処理がいらなくなるよ
        dx *= -1
        dy *= -1
     dx < 0 dx 0 dx *= -1 dx -1 dy *= -1 dy -1 if dx == 0:
        dy = max(dy, -dy)
     dx == 0 dx 0 dy = max(dy, -dy) dy max(dy, -dy) max dy -dy dy if dy == 0:
        dx = max(dx, -dx)
     dy == 0 dy 0 dx = max(dx, -dx) dx max(dx, -dx) max dx -dx dx cnts[(dx, dy)] += 1 cnts[(dx, dy)] cnts (dx, dy) dx dy 1 print(N - max(cnts.values())) print N - max(cnts.values()) N max(cnts.values()) max cnts.values() cnts.values cnts values cnts = defaultdict(lambda: 0) defaultdict(lambda: 0) cnts points = [tuple(map(int, input().split())) for _ in range(N)] [tuple(map(int, input().split())) for _ in range(N)] points dx = pa[0] - pb[0] pa[0] - pb[0] dx dy *= -1 -1 dy dx *= -1 -1 dx dx = max(dx, -dx) max(dx, -dx) dx N = int(input()) int(input()) N dy = pa[1] - pb[1] pa[1] - pb[1] dy dy = max(dy, -dy) max(dy, -dy) dy
# https://atcoder.jp/contests/diverta2019-2/tasks/diverta2019_2_b


from itertools import combinations
from collections import defaultdict

N = int(input())
points = [tuple(map(int, input().split())) for _ in range(N)]

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

# points.sort()  # 先にソートしておくと大小関係の処理が楽

cnts = defaultdict(lambda: 0)
for pa, pb in combinations(points, 2):
    dx = pa[0] - pb[0]
    dy = pa[1] - pb[1]
    if dx < 0:  # 事前にソートしておくとココらへんの処理がいらなくなるよ
        dx *= -1
        dy *= -1
    if dx == 0:
        dy = max(dy, -dy)
    if dy == 0:
        dx = max(dx, -dx)
    cnts[(dx, dy)] += 1

print(N - max(cnts.values()))
