n = gets.to_i
ball = []
for i in 0...n do
  ball[i] = gets.split.map(&:to_i)
end
ball.sort! { |e, f|
  if e[0] == f[0]
    e[1] <=> f[1]
  else
    e[0] <=> f[0]
  end
}
hash = {}
for i in 0...(n-1) do
  diff = [ball[i+1][0] - ball[i][0], ball[i+1][1] - ball[i][1]]
  if hash[diff].nil?
    hash[diff] = 1
  else
    hash[diff] += 1
  end
end
sum = 0
max = 0
hash.each_key { |k|
  sum += hash[k]
  max = hash[k] if max < hash[k]
}
puts sum - max + 1
