
import numpy as np
from functools import *
import sys
sys.setrecursionlimit(100000)
input = sys.stdin.readline




def acinput():
    return list(map(int, input().split(" ")))


def II():
    return int(input())

directions=np.array([[1,0],[0,1],[-1,0],[0,-1]])
directions = list(map(np.array, directions))

mod = 10**9+7


def factorial(n):
    fact = 1
    for integer in range(1, n + 1):
        fact *= integer
    return fact



def serch(x, count):
    #print("top", x, count)
            

    for d in directions:
        nx = d+x
        #print(nx)
        if np.all(0 <= nx) and np.all(nx < (H, W)):
            if field[nx[0]][nx[1]] == "E":
                count += 1 
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)  
                continue
            if field[nx[0]][nx[1]] == "#":
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)    
                 
    return count

N=int(input())

x= [np.array(acinput())for i in range(N)]
#x = [acinput() for i in range(N)]
#print(tmp)
#x=sorted(tmp)

import itertools as it

from collections import defaultdict
#es=10**10

#dc={}
dc=defaultdict(int)

for cb in it.combinations(x,2):
    d=cb[0]-cb[1]
    d2=tuple(-d)
    d=tuple(d)
    dc[d]+=1
    dc[d2]+=1

#print(dc)    
if N==1:
    print(1)
else:
    print(N-max(dc.values()))
    
     import numpy as np numpy from functools import * import sys sys sys.setrecursionlimit(100000) sys.setrecursionlimit sys setrecursionlimit 100000 input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def acinput():
    return list(map(int, input().split(" "))) acinput return list(map(int, input().split(" "))) list(map(int, input().split(" "))) list map(int, input().split(" ")) map int input().split(" ") ().split () input split " " def II():
    return int(input()) II return int(input()) int(input()) int input() input directions=np.array([[1,0],[0,1],[-1,0],[0,-1]]) directions np.array([[1,0],[0,1],[-1,0],[0,-1]]) np.array np array [[1,0],[0,1],[-1,0],[0,-1]] [1,0] 1 0 [0,1] 0 1 [-1,0] -1 0 [0,-1] 0 -1 directions = list(map(np.array, directions)) directions list(map(np.array, directions)) list map(np.array, directions) map np.array np array directions mod = 10**9+7 mod 10**9+7 10**9 10 9 7 def factorial(n):
    fact = 1
    for integer in range(1, n + 1):
        fact *= integer
    return fact factorial fact = 1 fact 1 for integer in range(1, n + 1):
        fact *= integer
     integer range(1, n + 1) range 1 n + 1 n 1 fact *= integer fact integer return fact fact n n def serch(x, count):
    #print("top", x, count)
            

    for d in directions:
        nx = d+x
        #print(nx)
        if np.all(0 <= nx) and np.all(nx < (H, W)):
            if field[nx[0]][nx[1]] == "E":
                count += 1 
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)  
                continue
            if field[nx[0]][nx[1]] == "#":
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)    
                 
    return count serch for d in directions:
        nx = d+x
        #print(nx)
        if np.all(0 <= nx) and np.all(nx < (H, W)):
            if field[nx[0]][nx[1]] == "E":
                count += 1 
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)  
                continue
            if field[nx[0]][nx[1]] == "#":
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)    
                 
     d directions nx = d+x nx d+x d x if np.all(0 <= nx) and np.all(nx < (H, W)):
            if field[nx[0]][nx[1]] == "E":
                count += 1 
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)  
                continue
            if field[nx[0]][nx[1]] == "#":
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)    
                 
     np.all(0 <= nx) and np.all(nx < (H, W)) np.all(0 <= nx) np.all np all 0 <= nx 0 nx np.all(nx < (H, W)) np.all np all nx < (H, W) nx (H, W) H W if field[nx[0]][nx[1]] == "E":
                count += 1 
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)  
                continue
             field[nx[0]][nx[1]] == "E" field[nx[0]][nx[1]] [nx[0]] field nx[0] nx 0 nx[1] nx 1 "E" count += 1 count 1 field[nx[0]][nx[1]] = "V" field[nx[0]][nx[1]] [nx[0]] field nx[0] nx 0 nx[1] nx 1 "V" count = serch(nx, count) count serch(nx, count) serch nx count continue if field[nx[0]][nx[1]] == "#":
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)    
                 
     field[nx[0]][nx[1]] == "#" field[nx[0]][nx[1]] [nx[0]] field nx[0] nx 0 nx[1] nx 1 "#" field[nx[0]][nx[1]] = "V" field[nx[0]][nx[1]] [nx[0]] field nx[0] nx 0 nx[1] nx 1 "V" count = serch(nx, count) count serch(nx, count) serch nx count return count count x x count count N=int(input()) N int(input()) int input() input np.array(acinput())for i in range(N) for i in range(N) i range(N) range N for i in range(N) np.array(acinput()) np.array np array acinput() acinput x= [np.array(acinput())for i in range(N)] x [np.array(acinput())for i in range(N)] import itertools as it itertools from collections import defaultdict dc=defaultdict(int) dc defaultdict(int) defaultdict int for cb in it.combinations(x,2):
    d=cb[0]-cb[1]
    d2=tuple(-d)
    d=tuple(d)
    dc[d]+=1
    dc[d2]+=1

#print(dc)     cb it.combinations(x,2) it.combinations it combinations x 2 d=cb[0]-cb[1] d cb[0]-cb[1] cb[0] cb 0 cb[1] cb 1 d2=tuple(-d) d2 tuple(-d) tuple -d d d=tuple(d) d tuple(d) tuple d dc[d]+=1 dc[d] dc d 1 dc[d2]+=1 dc[d2] dc d2 1 if N==1:
    print(1)
else:
    print(N-max(dc.values()))
    
     N==1 N 1 print(1) print 1 print(N-max(dc.values())) print N-max(dc.values()) N max(dc.values()) max dc.values() dc.values dc values mod = 10**9+7 10**9+7 mod def acinput():
    return list(map(int, input().split(" "))) def acinput():
    return list(map(int, input().split(" "))) acinput d=tuple(d) tuple(d) d d=cb[0]-cb[1] cb[0]-cb[1] d N=int(input()) int(input()) N def serch(x, count):
    #print("top", x, count)
            

    for d in directions:
        nx = d+x
        #print(nx)
        if np.all(0 <= nx) and np.all(nx < (H, W)):
            if field[nx[0]][nx[1]] == "E":
                count += 1 
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)  
                continue
            if field[nx[0]][nx[1]] == "#":
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)    
                 
    return count def serch(x, count):
    #print("top", x, count)
            

    for d in directions:
        nx = d+x
        #print(nx)
        if np.all(0 <= nx) and np.all(nx < (H, W)):
            if field[nx[0]][nx[1]] == "E":
                count += 1 
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)  
                continue
            if field[nx[0]][nx[1]] == "#":
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)    
                 
    return count serch x= [np.array(acinput())for i in range(N)] [np.array(acinput())for i in range(N)] x def II():
    return int(input()) def II():
    return int(input()) II dc=defaultdict(int) defaultdict(int) dc directions = list(map(np.array, directions)) list(map(np.array, directions)) directions def factorial(n):
    fact = 1
    for integer in range(1, n + 1):
        fact *= integer
    return fact def factorial(n):
    fact = 1
    for integer in range(1, n + 1):
        fact *= integer
    return fact factorial input = sys.stdin.readline sys.stdin.readline input d2=tuple(-d) tuple(-d) d2 directions=np.array([[1,0],[0,1],[-1,0],[0,-1]]) np.array([[1,0],[0,1],[-1,0],[0,-1]]) directions

import numpy as np
from functools import *
import sys
sys.setrecursionlimit(100000)
input = sys.stdin.readline




def acinput():
    return list(map(int, input().split(" ")))


def II():
    return int(input())

directions=np.array([[1,0],[0,1],[-1,0],[0,-1]])
directions = list(map(np.array, directions))

mod = 10**9+7


def factorial(n):
    fact = 1
    for integer in range(1, n + 1):
        fact *= integer
    return fact



def serch(x, count):
    #print("top", x, count)
            

    for d in directions:
        nx = d+x
        #print(nx)
        if np.all(0 <= nx) and np.all(nx < (H, W)):
            if field[nx[0]][nx[1]] == "E":
                count += 1 
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)  
                continue
            if field[nx[0]][nx[1]] == "#":
                field[nx[0]][nx[1]] = "V"
                count = serch(nx, count)    
                 
    return count

N=int(input())

x= [np.array(acinput())for i in range(N)]
#x = [acinput() for i in range(N)]
#print(tmp)
#x=sorted(tmp)

import itertools as it

from collections import defaultdict
#es=10**10

#dc={}
dc=defaultdict(int)

for cb in it.combinations(x,2):
    d=cb[0]-cb[1]
    d2=tuple(-d)
    d=tuple(d)
    dc[d]+=1
    dc[d2]+=1

#print(dc)    
if N==1:
    print(1)
else:
    print(N-max(dc.values()))
    
    
