import sys
sys.setrecursionlimit(10**6)

def get_par(x):
  if x == par_list[x]:
    return x
  else:
    par_list[x] = get_par(par_list[x])
    return par_list[x]

def merge(x,y):
  par_x = get_par(x)
  par_y = get_par(y)
  if par_x != par_y:
    par_list[par_y] = par_x

def is_same(x,y):
  return get_par(x) == get_par(y)

N=int(input())
if N<=2:
  print(1)
  sys.exit(0)

xylist=[]
for i in range(N):
  x,y=map(int,input().split())
  xylist.append((x,y))
xylist.sort()
#print(xylist)

pqset=set()
for i in range(N):
  x1,y1=xylist[i]
  for j in range(i+1,N):
    x2,y2=xylist[j]
    p=x2-x1
    q=y2-y1
    pqset.add((p,q))
#print(len(pqset))
    
answer=50
for p,q in pqset:
  par_list=list(range(N))
  for i in range(N):
    x1,y1=xylist[i]
    for j in range(i+1,N):
      x2,y2=xylist[j]
      if p==x2-x1 and q==y2-y1:
        merge(i,j)
        
  comp_set=set()
  for i in range(N):
    comp_set.add(get_par(i))
  answer=min(answer,len(comp_set))
    
print(answer) import sys sys sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 def get_par(x):
  if x == par_list[x]:
    return x
  else:
    par_list[x] = get_par(par_list[x])
    return par_list[x] get_par if x == par_list[x]:
    return x
  else:
    par_list[x] = get_par(par_list[x])
    return par_list[x] x == par_list[x] x par_list[x] par_list x return x x par_list[x] = get_par(par_list[x]) par_list[x] par_list x get_par(par_list[x]) get_par par_list[x] par_list x return par_list[x] par_list[x] par_list x x x def merge(x,y):
  par_x = get_par(x)
  par_y = get_par(y)
  if par_x != par_y:
    par_list[par_y] = par_x merge par_x = get_par(x) par_x get_par(x) get_par x par_y = get_par(y) par_y get_par(y) get_par y if par_x != par_y:
    par_list[par_y] = par_x par_x != par_y par_x par_y par_list[par_y] = par_x par_list[par_y] par_list par_y par_x x x y y def is_same(x,y):
  return get_par(x) == get_par(y) is_same return get_par(x) == get_par(y) get_par(x) == get_par(y) get_par(x) get_par x get_par(y) get_par y x x y y N=int(input()) N int(input()) int input() input if N<=2:
  print(1)
  sys.exit(0) N<=2 N 2 print(1) print 1 sys.exit(0) sys.exit sys exit 0 xylist=[] xylist [] for i in range(N):
  x,y=map(int,input().split())
  xylist.append((x,y)) i range(N) range N x,y=map(int,input().split()) x map(int,input().split()) map int input().split() ().split () input split y xylist.append((x,y)) xylist.append xylist append (x,y) x y xylist.sort() xylist.sort xylist sort pqset=set() pqset set() set for i in range(N):
  x1,y1=xylist[i]
  for j in range(i+1,N):
    x2,y2=xylist[j]
    p=x2-x1
    q=y2-y1
    pqset.add((p,q))
#print(len(pqset))
     i range(N) range N x1,y1=xylist[i] x1 xylist[i] xylist i y1 for j in range(i+1,N):
    x2,y2=xylist[j]
    p=x2-x1
    q=y2-y1
    pqset.add((p,q))
#print(len(pqset))
     j range(i+1,N) range i+1 i 1 N x2,y2=xylist[j] x2 xylist[j] xylist j y2 p=x2-x1 p x2-x1 x2 x1 q=y2-y1 q y2-y1 y2 y1 pqset.add((p,q)) pqset.add pqset add (p,q) p q answer=50 answer 50 for p,q in pqset:
  par_list=list(range(N))
  for i in range(N):
    x1,y1=xylist[i]
    for j in range(i+1,N):
      x2,y2=xylist[j]
      if p==x2-x1 and q==y2-y1:
        merge(i,j)
        
  comp_set=set()
  for i in range(N):
    comp_set.add(get_par(i))
  answer=min(answer,len(comp_set))
     p q pqset par_list=list(range(N)) par_list list(range(N)) list range(N) range N for i in range(N):
    x1,y1=xylist[i]
    for j in range(i+1,N):
      x2,y2=xylist[j]
      if p==x2-x1 and q==y2-y1:
        merge(i,j)
        
   i range(N) range N x1,y1=xylist[i] x1 xylist[i] xylist i y1 for j in range(i+1,N):
      x2,y2=xylist[j]
      if p==x2-x1 and q==y2-y1:
        merge(i,j)
        
   j range(i+1,N) range i+1 i 1 N x2,y2=xylist[j] x2 xylist[j] xylist j y2 if p==x2-x1 and q==y2-y1:
        merge(i,j)
        
   p==x2-x1 and q==y2-y1 p==x2-x1 p x2-x1 x2 x1 q==y2-y1 q y2-y1 y2 y1 merge(i,j) merge i j comp_set=set() comp_set set() set for i in range(N):
    comp_set.add(get_par(i))
   i range(N) range N comp_set.add(get_par(i)) comp_set.add comp_set add get_par(i) get_par i answer=min(answer,len(comp_set)) answer min(answer,len(comp_set)) min answer len(comp_set) len comp_set print(answer) print answer def is_same(x,y):
  return get_par(x) == get_par(y) def is_same(x,y):
  return get_par(x) == get_par(y) is_same N=int(input()) int(input()) N x1,y1=xylist[i] xylist[i] x1 par_list=list(range(N)) list(range(N)) par_list x1,y1=xylist[i] xylist[i] x1 q=y2-y1 y2-y1 q xylist=[] [] xylist y2=xylist[j] xylist[j] y2 def merge(x,y):
  par_x = get_par(x)
  par_y = get_par(y)
  if par_x != par_y:
    par_list[par_y] = par_x def merge(x,y):
  par_x = get_par(x)
  par_y = get_par(y)
  if par_x != par_y:
    par_list[par_y] = par_x merge answer=min(answer,len(comp_set)) min(answer,len(comp_set)) answer comp_set=set() set() comp_set x2,y2=xylist[j] xylist[j] x2 x,y=map(int,input().split()) map(int,input().split()) x y=map(int,input().split()) map(int,input().split()) y y1=xylist[i] xylist[i] y1 pqset=set() set() pqset def get_par(x):
  if x == par_list[x]:
    return x
  else:
    par_list[x] = get_par(par_list[x])
    return par_list[x] def get_par(x):
  if x == par_list[x]:
    return x
  else:
    par_list[x] = get_par(par_list[x])
    return par_list[x] get_par y2=xylist[j] xylist[j] y2 p=x2-x1 x2-x1 p y1=xylist[i] xylist[i] y1 x2,y2=xylist[j] xylist[j] x2 answer=50 50 answer
import sys
sys.setrecursionlimit(10**6)

def get_par(x):
  if x == par_list[x]:
    return x
  else:
    par_list[x] = get_par(par_list[x])
    return par_list[x]

def merge(x,y):
  par_x = get_par(x)
  par_y = get_par(y)
  if par_x != par_y:
    par_list[par_y] = par_x

def is_same(x,y):
  return get_par(x) == get_par(y)

N=int(input())
if N<=2:
  print(1)
  sys.exit(0)

xylist=[]
for i in range(N):
  x,y=map(int,input().split())
  xylist.append((x,y))
xylist.sort()
#print(xylist)

pqset=set()
for i in range(N):
  x1,y1=xylist[i]
  for j in range(i+1,N):
    x2,y2=xylist[j]
    p=x2-x1
    q=y2-y1
    pqset.add((p,q))
#print(len(pqset))
    
answer=50
for p,q in pqset:
  par_list=list(range(N))
  for i in range(N):
    x1,y1=xylist[i]
    for j in range(i+1,N):
      x2,y2=xylist[j]
      if p==x2-x1 and q==y2-y1:
        merge(i,j)
        
  comp_set=set()
  for i in range(N):
    comp_set.add(get_par(i))
  answer=min(answer,len(comp_set))
    
print(answer)