N = gets.chomp.to_i
xy = Array.new(N){Array.new(2,0)}
sub = Array.new(N*(N-1)/2){Array.new(2,0)}

for x in 0...N
  str = gets.split
  xy[x][0],xy[x][1] = str[0].to_i, str[1].to_i
end

if N <= 2
  puts 1
  exit
end

i = 0
for x in 0...N-1
  for y in x+1...N
    sub[i][0],sub[i][1] = xy[x][0]-xy[y][0], xy[x][1]-xy[y][1]
    i += 1
  end
end

sub.sort_by! {|x| [x[0], x[1]]}

max = 0
a = 0
for x in 0...sub.size-1
  if sub[x][0] == sub[x+1][0] && sub[x][1] == sub[x+1][1]
    a += 1
  else
    if a > max
      max = a
    end
    a = 0
  end
end
if a > max
  max = a
end

puts N-max-1