class Ball
        attr_reader :x, :y
     
        def initialize(x, y)
            @x = x
            @y = y
        end
    end
     
    class ZeroCostCounter
        def initialize(balls)
            balls.each do |ball|
              @counter["#{ball.x},#{ball.y}"] =0
            end
        end
     
        def inc(x, y)
            @counter["#{x},#{y}"] += 1
        end
     
        def max
            @counter.inject(0) {|m, (_, v)| m = (v > m) ? v : m }
        end
    end
     
    n = gets.chomp!.to_i
     
    balls = n.times.map {
      x, y = gets.chomp!.split(" ").map!(&:to_i)
      Ball.new(x, y) 
    }
     
    counter = ZeroCostCounter.new(balls)
    balls.permutation(2).each do |ball1, ball2|
      diff_x = ball1.x - ball2.x
      diff_y = ball1.y - ball2.y
      counter.inc(diff_x, diff_y)
    end
     
    puts n - counter.max