n = gets.strip.to_i
xys = n.times.map { gets.strip.split.map(&:to_i) }

if n == 1
    puts 1
else
    puts n - xys.combination(2).to_a.map { |c|
        p1, p2 = c
        [(p1[0] - p2[0]).abs, (p1[1] - p2[1]).abs]
    }.group_by(&:itself).map { |k, v| [v.size, k] }.max_by(&:first)[0]
end
