import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

n = int(input())

x = [0]*n
y = [0]*n
for i in range(n):
    xx,yy= map(int, input().split())
    x[i] = xx-1
    y[i] = yy-1

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

from collections import defaultdict
d = defaultdict(lambda:0)

for i in range(n):
    for j in range(n):
        if i==j:continue

        p = x[j]-x[i]
        q = y[j]-y[i]

        d[p*10**9+q] +=1

dv = d.values()
mad =max(dv)

print(n-mad) import sys sys sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline n = int(input()) n int(input()) int input() input x = [0]*n x [0]*n [0] 0 n y = [0]*n y [0]*n [0] 0 n for i in range(n):
    xx,yy= map(int, input().split())
    x[i] = xx-1
    y[i] = yy-1 i range(n) range n xx,yy= map(int, input().split()) xx map(int, input().split()) map int input().split() ().split () input split yy x[i] = xx-1 x[i] x i xx-1 xx 1 y[i] = yy-1 y[i] y i yy-1 yy 1 if n==1:
    print(1)
    exit() n==1 n 1 print(1) print 1 exit() exit from collections import defaultdict d = defaultdict(lambda:0) d defaultdict(lambda:0) defaultdict lambda:0 0 for i in range(n):
    for j in range(n):
        if i==j:continue

        p = x[j]-x[i]
        q = y[j]-y[i]

        d[p*10**9+q] +=1 i range(n) range n for j in range(n):
        if i==j:continue

        p = x[j]-x[i]
        q = y[j]-y[i]

        d[p*10**9+q] +=1 j range(n) range n if i==j:continue

         i==j i j p = x[j]-x[i] p x[j]-x[i] x[j] x j x[i] x i q = y[j]-y[i] q y[j]-y[i] y[j] y j y[i] y i d[p*10**9+q] +=1 d[p*10**9+q] d p*10**9+q p*10**9 p 10**9 10 9 q 1 dv = d.values() dv d.values() d.values d values mad =max(dv) mad max(dv) max dv print(n-mad) print n-mad n mad input = sys.stdin.readline sys.stdin.readline input p = x[j]-x[i] x[j]-x[i] p dv = d.values() d.values() dv q = y[j]-y[i] y[j]-y[i] q yy= map(int, input().split()) map(int, input().split()) yy d = defaultdict(lambda:0) defaultdict(lambda:0) d xx,yy= map(int, input().split()) map(int, input().split()) xx n = int(input()) int(input()) n x = [0]*n [0]*n x y = [0]*n [0]*n y mad =max(dv) max(dv) mad
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

n = int(input())

x = [0]*n
y = [0]*n
for i in range(n):
    xx,yy= map(int, input().split())
    x[i] = xx-1
    y[i] = yy-1

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

from collections import defaultdict
d = defaultdict(lambda:0)

for i in range(n):
    for j in range(n):
        if i==j:continue

        p = x[j]-x[i]
        q = y[j]-y[i]

        d[p*10**9+q] +=1

dv = d.values()
mad =max(dv)

print(n-mad)
