n = gets.to_i
balls = []

n.times do
  balls << gets.split.map(&:to_i)
end

gaps = []

for i in 0 .. n - 2
  for j in i + 1 .. n - 1
    gaps << [balls[j][0] - balls[i][0], balls[j][1] - balls[i][1]]
  end
end

gaps.sort!

cnt  = 0
max  = 0
last = [gaps[0][0], gaps[0][1]]
gmax = [gaps[0][0], gaps[0][1]]

for i in 1 .. gaps.size - 1
  cnt += 1
  if i == gaps.size - 1 || last[0] != gaps[i][0] || last[1] != gaps[i][1]
    if max < cnt
      max  = cnt
      gmax = [last[0], last[1]]
    end
    cnt = 0
  end
  last = [gaps[i][0], gaps[i][1]]
end

#p gaps, gmax 

puts n - gaps.count(gmax)
