N = gets.to_i
XY = $<.map{|s|
  s.split.map &:to_i
}
XY.sort!
h = Hash.new 0
N.times{|i|
  (i+1...N).each{|j|
    x = XY[j][0] - XY[i][0]
    y = XY[j][1] - XY[i][1]
    h[[x,y]] += 1
  }
}
max = h.max_by{|k, v| v }.last
p N - max