import itertools
def main():
  N = int(input())
  posi = []
  for i in range(N):
    posi.append(list(map(int, input().split())))
  posi.sort()
  num = [i for i in range(N)]
  ans = 1000000000
  for pair in itertools.combinations(num,2):
    p = posi[pair[1]][0]-posi[pair[0]][0]
    q = posi[pair[1]][1]-posi[pair[0]][1]
    ch = [True]*N
    ans_temp = 0
    for i in range(N):
      if ch[i]:
        ans_temp += 1
        ch[i] = False
      now = posi[i]
      while [now[0] +  p, now[1] + q] in posi:
        ch[posi.index([now[0] +  p, now[1] + q])] = False
        now = [now[0] +  p, now[1] + q]
    ans = min(ans, ans_temp)
  if N == 1:
    ans = 1
  print(ans)
    
  
if __name__ == "__main__":
  main() import itertools itertools def main():
  N = int(input())
  posi = []
  for i in range(N):
    posi.append(list(map(int, input().split())))
  posi.sort()
  num = [i for i in range(N)]
  ans = 1000000000
  for pair in itertools.combinations(num,2):
    p = posi[pair[1]][0]-posi[pair[0]][0]
    q = posi[pair[1]][1]-posi[pair[0]][1]
    ch = [True]*N
    ans_temp = 0
    for i in range(N):
      if ch[i]:
        ans_temp += 1
        ch[i] = False
      now = posi[i]
      while [now[0] +  p, now[1] + q] in posi:
        ch[posi.index([now[0] +  p, now[1] + q])] = False
        now = [now[0] +  p, now[1] + q]
    ans = min(ans, ans_temp)
  if N == 1:
    ans = 1
  print(ans)
    
   main N = int(input()) N int(input()) int input() input posi = [] posi [] for i in range(N):
    posi.append(list(map(int, input().split())))
   i range(N) range N posi.append(list(map(int, input().split()))) posi.append posi append list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split posi.sort() posi.sort posi sort i for i in range(N) for i in range(N) i range(N) range N for i in range(N) i num = [i for i in range(N)] num [i for i in range(N)] ans = 1000000000 ans 1000000000 for pair in itertools.combinations(num,2):
    p = posi[pair[1]][0]-posi[pair[0]][0]
    q = posi[pair[1]][1]-posi[pair[0]][1]
    ch = [True]*N
    ans_temp = 0
    for i in range(N):
      if ch[i]:
        ans_temp += 1
        ch[i] = False
      now = posi[i]
      while [now[0] +  p, now[1] + q] in posi:
        ch[posi.index([now[0] +  p, now[1] + q])] = False
        now = [now[0] +  p, now[1] + q]
    ans = min(ans, ans_temp)
   pair itertools.combinations(num,2) itertools.combinations itertools combinations num 2 p = posi[pair[1]][0]-posi[pair[0]][0] p posi[pair[1]][0]-posi[pair[0]][0] posi[pair[1]][0] [pair[1]] posi pair[1] pair 1 0 posi[pair[0]][0] [pair[0]] posi pair[0] pair 0 0 q = posi[pair[1]][1]-posi[pair[0]][1] q posi[pair[1]][1]-posi[pair[0]][1] posi[pair[1]][1] [pair[1]] posi pair[1] pair 1 1 posi[pair[0]][1] [pair[0]] posi pair[0] pair 0 1 ch = [True]*N ch [True]*N [True] True N ans_temp = 0 ans_temp 0 for i in range(N):
      if ch[i]:
        ans_temp += 1
        ch[i] = False
      now = posi[i]
      while [now[0] +  p, now[1] + q] in posi:
        ch[posi.index([now[0] +  p, now[1] + q])] = False
        now = [now[0] +  p, now[1] + q]
     i range(N) range N if ch[i]:
        ans_temp += 1
        ch[i] = False
       ch[i] ch i ans_temp += 1 ans_temp 1 ch[i] = False ch[i] ch i False now = posi[i] now posi[i] posi i while [now[0] +  p, now[1] + q] in posi:
        ch[posi.index([now[0] +  p, now[1] + q])] = False
        now = [now[0] +  p, now[1] + q]
     [now[0] +  p, now[1] + q] in posi [now[0] +  p, now[1] + q] now[0] +  p now[0] now 0 p now[1] + q now[1] now 1 q posi ch[posi.index([now[0] +  p, now[1] + q])] = False ch[posi.index([now[0] +  p, now[1] + q])] ch posi.index([now[0] +  p, now[1] + q]) posi.index posi index [now[0] +  p, now[1] + q] now[0] +  p now[0] now 0 p now[1] + q now[1] now 1 q False now = [now[0] +  p, now[1] + q] now [now[0] +  p, now[1] + q] now[0] +  p now[0] now 0 p now[1] + q now[1] now 1 q ans = min(ans, ans_temp) ans min(ans, ans_temp) min ans ans_temp if N == 1:
    ans = 1
   N == 1 N 1 ans = 1 ans 1 print(ans) print ans if __name__ == "__main__":
  main() __name__ == "__main__" __name__ "__main__" main() main def main():
  N = int(input())
  posi = []
  for i in range(N):
    posi.append(list(map(int, input().split())))
  posi.sort()
  num = [i for i in range(N)]
  ans = 1000000000
  for pair in itertools.combinations(num,2):
    p = posi[pair[1]][0]-posi[pair[0]][0]
    q = posi[pair[1]][1]-posi[pair[0]][1]
    ch = [True]*N
    ans_temp = 0
    for i in range(N):
      if ch[i]:
        ans_temp += 1
        ch[i] = False
      now = posi[i]
      while [now[0] +  p, now[1] + q] in posi:
        ch[posi.index([now[0] +  p, now[1] + q])] = False
        now = [now[0] +  p, now[1] + q]
    ans = min(ans, ans_temp)
  if N == 1:
    ans = 1
  print(ans)
    
   def main():
  N = int(input())
  posi = []
  for i in range(N):
    posi.append(list(map(int, input().split())))
  posi.sort()
  num = [i for i in range(N)]
  ans = 1000000000
  for pair in itertools.combinations(num,2):
    p = posi[pair[1]][0]-posi[pair[0]][0]
    q = posi[pair[1]][1]-posi[pair[0]][1]
    ch = [True]*N
    ans_temp = 0
    for i in range(N):
      if ch[i]:
        ans_temp += 1
        ch[i] = False
      now = posi[i]
      while [now[0] +  p, now[1] + q] in posi:
        ch[posi.index([now[0] +  p, now[1] + q])] = False
        now = [now[0] +  p, now[1] + q]
    ans = min(ans, ans_temp)
  if N == 1:
    ans = 1
  print(ans)
    
   main
import itertools
def main():
  N = int(input())
  posi = []
  for i in range(N):
    posi.append(list(map(int, input().split())))
  posi.sort()
  num = [i for i in range(N)]
  ans = 1000000000
  for pair in itertools.combinations(num,2):
    p = posi[pair[1]][0]-posi[pair[0]][0]
    q = posi[pair[1]][1]-posi[pair[0]][1]
    ch = [True]*N
    ans_temp = 0
    for i in range(N):
      if ch[i]:
        ans_temp += 1
        ch[i] = False
      now = posi[i]
      while [now[0] +  p, now[1] + q] in posi:
        ch[posi.index([now[0] +  p, now[1] + q])] = False
        now = [now[0] +  p, now[1] + q]
    ans = min(ans, ans_temp)
  if N == 1:
    ans = 1
  print(ans)
    
  
if __name__ == "__main__":
  main()