import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())
xy=[list(map(int,input().split())) for i in range(n)]

# dic={}
# for i in range(n):
#     x,y=xy[i]
#     dic[(x,y)]=1
if n==1:
    print(1)
    quit()
cnt=0
sadic=defaultdict(int)
for i in range(n):
    x,y=xy[i]
    for j in range(n):
        if i==j:
            continue
        x2,y2=xy[j]
        p,q=x-x2,y-y2
        sadic[(p,q)]+=1
# print(sadic)
print(n-max(sadic.values())) import bisect bisect import copy copy import heapq heapq import math math import sys sys from collections import * from functools import lru_cache from itertools import accumulate, combinations, permutations, product def input():
    return sys.stdin.readline()[:-1] input return sys.stdin.readline()[:-1] sys.stdin.readline()[:-1] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline :-1 -1 def ruiseki(lst):
    return [0]+list(accumulate(lst)) ruiseki return [0]+list(accumulate(lst)) [0]+list(accumulate(lst)) [0] 0 list(accumulate(lst)) list accumulate(lst) accumulate lst lst lst sys.setrecursionlimit(5000000) sys.setrecursionlimit sys setrecursionlimit 5000000 mod=pow(10,9)+7 mod pow(10,9)+7 pow(10,9) pow 10 9 7 chr(ord('a') + i) for i in range(26) for i in range(26) i range(26) range 26 for i in range(26) chr(ord('a') + i) chr ord('a') + i ord('a') ord 'a' i al=[chr(ord('a') + i) for i in range(26)] al [chr(ord('a') + i) for i in range(26)] direction=[[1,0],[0,1],[-1,0],[0,-1]] direction [[1,0],[0,1],[-1,0],[0,-1]] [1,0] 1 0 [0,1] 0 1 [-1,0] -1 0 [0,-1] 0 -1 n=int(input()) n int(input()) int input() input list(map(int,input().split())) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split xy=[list(map(int,input().split())) for i in range(n)] xy [list(map(int,input().split())) for i in range(n)] if n==1:
    print(1)
    quit() n==1 n 1 print(1) print 1 quit() quit cnt=0 cnt 0 sadic=defaultdict(int) sadic defaultdict(int) defaultdict int for i in range(n):
    x,y=xy[i]
    for j in range(n):
        if i==j:
            continue
        x2,y2=xy[j]
        p,q=x-x2,y-y2
        sadic[(p,q)]+=1
# print(sadic) i range(n) range n x,y=xy[i] x xy[i] xy i y for j in range(n):
        if i==j:
            continue
        x2,y2=xy[j]
        p,q=x-x2,y-y2
        sadic[(p,q)]+=1
# print(sadic) j range(n) range n if i==j:
            continue
         i==j i j continue x2,y2=xy[j] x2 xy[j] xy j y2 p,q=x-x2,y-y2 p x-x2 x x2 q y-y2 y y2 sadic[(p,q)]+=1 sadic[(p,q)] sadic (p,q) p q 1 print(n-max(sadic.values())) print n-max(sadic.values()) n max(sadic.values()) max sadic.values() sadic.values sadic values cnt=0 0 cnt q=x-x2,y-y2 y-y2 q direction=[[1,0],[0,1],[-1,0],[0,-1]] [[1,0],[0,1],[-1,0],[0,-1]] direction sadic=defaultdict(int) defaultdict(int) sadic def input():
    return sys.stdin.readline()[:-1] def input():
    return sys.stdin.readline()[:-1] input mod=pow(10,9)+7 pow(10,9)+7 mod y=xy[i] xy[i] y n=int(input()) int(input()) n xy=[list(map(int,input().split())) for i in range(n)] [list(map(int,input().split())) for i in range(n)] xy x2,y2=xy[j] xy[j] x2 def ruiseki(lst):
    return [0]+list(accumulate(lst)) def ruiseki(lst):
    return [0]+list(accumulate(lst)) ruiseki p,q=x-x2,y-y2 x-x2 p al=[chr(ord('a') + i) for i in range(26)] [chr(ord('a') + i) for i in range(26)] al y2=xy[j] xy[j] y2 x,y=xy[i] xy[i] x
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(5000000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())
xy=[list(map(int,input().split())) for i in range(n)]

# dic={}
# for i in range(n):
#     x,y=xy[i]
#     dic[(x,y)]=1
if n==1:
    print(1)
    quit()
cnt=0
sadic=defaultdict(int)
for i in range(n):
    x,y=xy[i]
    for j in range(n):
        if i==j:
            continue
        x2,y2=xy[j]
        p,q=x-x2,y-y2
        sadic[(p,q)]+=1
# print(sadic)
print(n-max(sadic.values()))