import sys
from collections import defaultdict, deque
import bisect
from heapq import *
from math import factorial, ceil, floor
sys.setrecursionlimit(200000)
input = sys.stdin.readline

# N, M, = map(int, input().split())
# N = int(input())
# L = [int(v) for v in input().split()]
# L = [[int(v) for v in input().split()] for _ in range(N)]
# L = [int(input()) for _ in range(N)]
# L = [list(input().strip())  for _ in range(N)]
# S = input().strip()

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

m = {}
for i in range(N):
    for j in range(N):
        if i != j:
            x, y = L[i]
            x2, y2 = L[j]

            key = (x - x2, y - y2)

            if m.get(key) == None:
                m[key] = 0
            m[key] += 1

if m == {}:
    print(1)
    exit()
print(N - max(m.values())) import sys sys from collections import defaultdict, deque import bisect bisect from heapq import * from math import factorial, ceil, floor sys.setrecursionlimit(200000) sys.setrecursionlimit sys setrecursionlimit 200000 input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline N, = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split [int(v) for v in input().split()] for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) [int(v) for v in input().split()] L = [[int(v) for v in input().split()] for _ in range(N)] L [[int(v) for v in input().split()] for _ in range(N)] m = {} m {} for i in range(N):
    for j in range(N):
        if i != j:
            x, y = L[i]
            x2, y2 = L[j]

            key = (x - x2, y - y2)

            if m.get(key) == None:
                m[key] = 0
            m[key] += 1 i range(N) range N for j in range(N):
        if i != j:
            x, y = L[i]
            x2, y2 = L[j]

            key = (x - x2, y - y2)

            if m.get(key) == None:
                m[key] = 0
            m[key] += 1 j range(N) range N if i != j:
            x, y = L[i]
            x2, y2 = L[j]

            key = (x - x2, y - y2)

            if m.get(key) == None:
                m[key] = 0
            m[key] += 1 i != j i j x, y = L[i] x L[i] L i y x2, y2 = L[j] x2 L[j] L j y2 key = (x - x2, y - y2) key (x - x2, y - y2) x - x2 x x2 y - y2 y y2 if m.get(key) == None:
                m[key] = 0
             m.get(key) == None m.get(key) m.get m get key None m[key] = 0 m[key] m key 0 m[key] += 1 m[key] m key 1 if m == {}:
    print(1)
    exit() m == {} m {} print(1) print 1 exit() exit print(N - max(m.values())) print N - max(m.values()) N max(m.values()) max m.values() m.values m values y2 = L[j] L[j] y2 x, y = L[i] L[i] x m = {} {} m key = (x - x2, y - y2) (x - x2, y - y2) key L = [[int(v) for v in input().split()] for _ in range(N)] [[int(v) for v in input().split()] for _ in range(N)] L y = L[i] L[i] y input = sys.stdin.readline sys.stdin.readline input N, = map(int, input().split()) map(int, input().split()) N x2, y2 = L[j] L[j] x2
import sys
from collections import defaultdict, deque
import bisect
from heapq import *
from math import factorial, ceil, floor
sys.setrecursionlimit(200000)
input = sys.stdin.readline

# N, M, = map(int, input().split())
# N = int(input())
# L = [int(v) for v in input().split()]
# L = [[int(v) for v in input().split()] for _ in range(N)]
# L = [int(input()) for _ in range(N)]
# L = [list(input().strip())  for _ in range(N)]
# S = input().strip()

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

m = {}
for i in range(N):
    for j in range(N):
        if i != j:
            x, y = L[i]
            x2, y2 = L[j]

            key = (x - x2, y - y2)

            if m.get(key) == None:
                m[key] = 0
            m[key] += 1

if m == {}:
    print(1)
    exit()
print(N - max(m.values()))