N = gets.to_i
xy = []
N.times { |i| xy << gets.split.map(&:to_i) }

xyc = Hash.new(0)
N.times do |i|
  xi, yi = xy[i]
  i.upto(N-1) do |j|
    next if i == j
    xj, yj = xy[j]
    xyc[ [(xi-xj).abs, (yi-yj).abs] ] += 1
  end
end

if N == 1
  puts 1
else
  puts N - xyc.sort_by { |k, v| -v }.first[1]
end