output_description: Print the minimum total cost required to collect all the balls.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      x_1 y_1
      :
      x_N y_N
attempt: #    !/usr/bin/env python3
  #    encoding: UTF-8
  #    Modified: <15/Jun/2019 05:47:43 PM>
  
  
  #    ✪ H4WK3yE乡
  #    Mohd. Farhan Tahir
  #    Indian Institute Of Information Technology (IIIT), Gwalior
  
  
  import sys
  import os
  from io import IOBase, BytesIO
  
  
  def main():
      n = int(input())
      arr = [0] * n
      for i in range(n):
          arr[i] = tuple(get_ints())
      if n == 1 or n == 2:
          print(1)
          return
      arr.sort()
      d = {}
      for i in range(n):
          for j in range(i + 1, n):
              if (arr[j][0] - arr[i][0], arr[j][1] - arr[i][1]) not in d:
                  d[(arr[j][0] - arr[i][0], arr[j][1] - arr[i][1])] = 0
              d[(arr[j][0] - arr[i][0], arr[j][1] - arr[i][1])] += 1
  
      from operator import itemgetter
  
      sorted_d = sorted(d.items(), key=itemgetter(1), reverse=True)
      # print(sorted_d)
  
      print(n - sorted_d[0][1])
  
  
  BUFSIZE = 8192
  
  
  class FastIO(BytesIO):
      newlines = 0
  
      def __init__(self, file):
          self._file = file
          self._fd = file.fileno()
          self.writable = "x" in file.mode or "w" in file.mode
          self.write = super(FastIO, self).write if self.writable else None
  
      def _fill(self):
          s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
          self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
          return s
  
      def read(self):
          while self._fill():
              pass
          return super(FastIO, self).read()
  
      def readline(self):
          while self.newlines == 0:
              s = self._fill()
              self.newlines = s.count(b"\n") + (not s)
          self.newlines -= 1
          return super(FastIO, self).readline()
  
      def flush(self):
          if self.writable:
              os.write(self._fd, self.getvalue())
              self.truncate(0), self.seek(0)
  
  
  class IOWrapper(IOBase):
      def __init__(self, file):
          py2 = round(0.5)
          self.buffer = FastIO(file)
          self.flush = self.buffer.flush
          self.writable = self.buffer.writable
          if py2:
              self.write = self.buffer.write
              self.read = self.buffer.read
              self.readline = self.buffer.readline
          else:
              self.write = lambda s: self.buffer.write(s.encode("ascii"))
              self.read = lambda: self.buffer.read().decode("ascii")
              self.readline = lambda: self.buffer.readline().decode("ascii")
  
  
  sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
  
  
  def get_array():
      return list(map(int, sys.stdin.readline().split()))
  
  
  def get_ints():
      return map(int, sys.stdin.readline().split())
  
  
  def input():
      return sys.stdin.readline().strip()
  
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  There are N balls in a two-dimensional plane. The i-th ball is at coordinates
  (x_i, y_i).
  
  We will collect all of these balls, by choosing two integers p and q such that
  p \neq 0 or q \neq 0 and then repeating the following operation:
  
    * Choose a ball remaining in the plane and collect it. Let (a, b) be the coordinates of this ball. If we collected a ball at coordinates (a - p, b - q) in the previous operation, the cost of this operation is 0. Otherwise, including when this is the first time to do this operation, the cost of this operation is 1.
  
  Find the minimum total cost required to collect all the balls when we
  optimally choose p and q.
samples: [{"input": "2\n    1 1\n    2 2", "output": "1\n    \n\nIf we choose p = 1, q = 1, we can collect all the balls at a cost of 1 by\ncollecting them in the order (1, 1), (2, 2).\n\n* * *"}, {"input": "3\n    1 4\n    4 6\n    7 8", "output": "1\n    \n\nIf we choose p = -3, q = -2, we can collect all the balls at a cost of 1 by\ncollecting them in the order (7, 8), (4, 6), (1, 4).\n\n* * *"}, {"input": "4\n    1 1\n    1 2\n    2 1\n    2 2", "output": "2"}]