n = gets.to_i
ball = Array.new(n).map{Array.new(2,0)}
n.times{|i| ball[i] = gets.split.map(&:to_i)}
ball.sort!
ans = 0
for i in 0..n-1
  for j in 0..n-1
    if i != j
      count = 0
      inst0 = ball[j][0]-ball[i][0]
      inst1 = ball[j][1]-ball[i][1]
      for k in 0..n-1
        for l in 0..n-1
          if k != l && ball[l][0]-ball[k][0]==inst0 && ball[l][1]-ball[k][1]==inst1
            count += 1
          end
        end
      end
      if ans < count
        ans = count
      end
    end
  end
end
puts n-ans
