#!/usr/bin/env python
# coding: utf-8

# In[9]:


N = int(input())
X = []; Y = []
for _ in range(N):
    x,y = map(int, input().split())
    X += [x]
    Y += [y]


# In[10]:


dic = {}
for i in range(N):
    for j in range(N):
        if i != j:
            x = X[i]-X[j]
            y = Y[i]-Y[j]
            dic[(x,y)] = dic.get((x,y),0) + 1
if N == 1:
    print(1)
else:
    print(N-max(dic.values()))


# In[ ]:



 N = int(input()) N int(input()) int input() input X = [] X [] Y = [] Y [] for _ in range(N):
    x,y = map(int, input().split())
    X += [x]
    Y += [y]


# In[10]: _ range(N) range N x,y = map(int, input().split()) x map(int, input().split()) map int input().split() ().split () input split y X += [x] X [x] x Y += [y] Y [y] y dic = {} dic {} for i in range(N):
    for j in range(N):
        if i != j:
            x = X[i]-X[j]
            y = Y[i]-Y[j]
            dic[(x,y)] = dic.get((x,y),0) + 1 i range(N) range N for j in range(N):
        if i != j:
            x = X[i]-X[j]
            y = Y[i]-Y[j]
            dic[(x,y)] = dic.get((x,y),0) + 1 j range(N) range N if i != j:
            x = X[i]-X[j]
            y = Y[i]-Y[j]
            dic[(x,y)] = dic.get((x,y),0) + 1 i != j i j x = X[i]-X[j] x X[i]-X[j] X[i] X i X[j] X j y = Y[i]-Y[j] y Y[i]-Y[j] Y[i] Y i Y[j] Y j dic[(x,y)] = dic.get((x,y),0) + 1 dic[(x,y)] dic (x,y) x y dic.get((x,y),0) + 1 dic.get((x,y),0) dic.get dic get (x,y) x y 0 1 if N == 1:
    print(1)
else:
    print(N-max(dic.values()))


# In[ ]: N == 1 N 1 print(1) print 1 print(N-max(dic.values())) print N-max(dic.values()) N max(dic.values()) max dic.values() dic.values dic values X = [] [] X Y = [] [] Y x,y = map(int, input().split()) map(int, input().split()) x Y += [y] [y] Y N = int(input()) int(input()) N X += [x] [x] X y = map(int, input().split()) map(int, input().split()) y x = X[i]-X[j] X[i]-X[j] x y = Y[i]-Y[j] Y[i]-Y[j] y dic = {} {} dic
#!/usr/bin/env python
# coding: utf-8

# In[9]:


N = int(input())
X = []; Y = []
for _ in range(N):
    x,y = map(int, input().split())
    X += [x]
    Y += [y]


# In[10]:


dic = {}
for i in range(N):
    for j in range(N):
        if i != j:
            x = X[i]-X[j]
            y = Y[i]-Y[j]
            dic[(x,y)] = dic.get((x,y),0) + 1
if N == 1:
    print(1)
else:
    print(N-max(dic.values()))


# In[ ]:




