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 = {}
vec = []
for i in 0...(n-1) do
  vector = [ball[i+1][0] - ball[i][0], ball[i+1][1] - ball[i][1]]
  vec[i] = vector
  if hash[vector].nil?
    hash[vector] = 1
  else
    hash[vector] += 1
  end
end
sum = 0
max = 0
vector_max = nil
hash.each_key { |v|
  sum += hash[v]
  if max < hash[v]
    max = hash[v]
    vector_max = v
  end
}
for i in 0...(n-1) do
  if vec[i] != vector_max
    j = i+1
    while j < (n-1) && vec[j] != vector_max
      if [vec[i][0] + vec[j][0], vec[i][1] + vec[j][1]] == vector_max
        max += 1
        break
      end
    end
  end
end
puts sum - max + 1
