def examB():
    N = I()
    X = [0]*N; Y = [0]*N
    for i in range(N):
        X[i],Y[i] = LI()
    pq = defaultdict(int)
    for i in range(N):
        for j in range(i+1,N):
            curx = X[j]-X[i]
            cury = Y[j]-Y[i]
            pq[curx,cury] +=1
            pq[-curx, -cury] += 1
    if N>1:
        ans = N - max(pq.values())
    else:
        ans = 1
    print(ans)

from string import digits
import sys,copy,bisect,itertools,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB() def examB():
    N = I()
    X = [0]*N; Y = [0]*N
    for i in range(N):
        X[i],Y[i] = LI()
    pq = defaultdict(int)
    for i in range(N):
        for j in range(i+1,N):
            curx = X[j]-X[i]
            cury = Y[j]-Y[i]
            pq[curx,cury] +=1
            pq[-curx, -cury] += 1
    if N>1:
        ans = N - max(pq.values())
    else:
        ans = 1
    print(ans) examB N = I() N I() I X = [0]*N X [0]*N [0] 0 N Y = [0]*N Y [0]*N [0] 0 N for i in range(N):
        X[i],Y[i] = LI()
     i range(N) range N X[i],Y[i] = LI() X[i] X i LI() LI Y[i] Y i pq = defaultdict(int) pq defaultdict(int) defaultdict int for i in range(N):
        for j in range(i+1,N):
            curx = X[j]-X[i]
            cury = Y[j]-Y[i]
            pq[curx,cury] +=1
            pq[-curx, -cury] += 1
     i range(N) range N for j in range(i+1,N):
            curx = X[j]-X[i]
            cury = Y[j]-Y[i]
            pq[curx,cury] +=1
            pq[-curx, -cury] += 1
     j range(i+1,N) range i+1 i 1 N curx = X[j]-X[i] curx X[j]-X[i] X[j] X j X[i] X i cury = Y[j]-Y[i] cury Y[j]-Y[i] Y[j] Y j Y[i] Y i pq[curx,cury] +=1 pq[curx,cury] pq curx 1 pq[-curx, -cury] += 1 pq[-curx, -cury] pq -curx curx 1 if N>1:
        ans = N - max(pq.values())
    else:
        ans = 1
     N>1 N 1 ans = N - max(pq.values()) ans N - max(pq.values()) N max(pq.values()) max pq.values() pq.values pq values ans = 1 ans 1 print(ans) print ans from string import digits import sys,copy,bisect,itertools,math sys copy bisect itertools math from heapq import heappop,heappush,heapify from collections import Counter,defaultdict,deque def I(): return int(sys.stdin.readline()) I def LI(): return list(map(int,sys.stdin.readline().split())) LI def LS(): return sys.stdin.readline().split() LS def SI(): return sys.stdin.readline().strip() SI mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 inf = float('inf') inf float('inf') float 'inf' examB() examB mod = 10**9 + 7 10**9 + 7 mod def LS(): return sys.stdin.readline().split() def LS(): return sys.stdin.readline().split() LS inf = float('inf') float('inf') inf def LI(): return list(map(int,sys.stdin.readline().split())) def LI(): return list(map(int,sys.stdin.readline().split())) LI def SI(): return sys.stdin.readline().strip() def SI(): return sys.stdin.readline().strip() SI def examB():
    N = I()
    X = [0]*N; Y = [0]*N
    for i in range(N):
        X[i],Y[i] = LI()
    pq = defaultdict(int)
    for i in range(N):
        for j in range(i+1,N):
            curx = X[j]-X[i]
            cury = Y[j]-Y[i]
            pq[curx,cury] +=1
            pq[-curx, -cury] += 1
    if N>1:
        ans = N - max(pq.values())
    else:
        ans = 1
    print(ans) def examB():
    N = I()
    X = [0]*N; Y = [0]*N
    for i in range(N):
        X[i],Y[i] = LI()
    pq = defaultdict(int)
    for i in range(N):
        for j in range(i+1,N):
            curx = X[j]-X[i]
            cury = Y[j]-Y[i]
            pq[curx,cury] +=1
            pq[-curx, -cury] += 1
    if N>1:
        ans = N - max(pq.values())
    else:
        ans = 1
    print(ans) examB def I(): return int(sys.stdin.readline()) def I(): return int(sys.stdin.readline()) I
def examB():
    N = I()
    X = [0]*N; Y = [0]*N
    for i in range(N):
        X[i],Y[i] = LI()
    pq = defaultdict(int)
    for i in range(N):
        for j in range(i+1,N):
            curx = X[j]-X[i]
            cury = Y[j]-Y[i]
            pq[curx,cury] +=1
            pq[-curx, -cury] += 1
    if N>1:
        ans = N - max(pq.values())
    else:
        ans = 1
    print(ans)

from string import digits
import sys,copy,bisect,itertools,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()
