# util functions

# debug
$debugFlag = ( ARGV[0] != nil )
p "==== DEBUG MODE ====" if $debugFlag

def pd(str)
  p str if $debugFlag
end

def printd(str)
  print str if $debugFlag
end

# input
inputs = []
lc = 0
nn = 0
while l = $stdin.gets do
  if lc == 0
    nn = l.chomp.to_i
  else
    inputs << l.chomp.split(" ").map(&:to_i)
  end
  lc += 1
end

# input check
if $debugFlag
  p "--- INPUT (begin) ---"
  inputs.each do |l_i|
    p l_i
  end
  p "--- INPUT (end) ---"
  print "\n"
end

# body
if $debugFlag
  p nn
  p inputs
end

if nn == 1
  puts 1
  exit
end

inputsy = inputs.clone
inputs.sort_by! {|x, y| x}
inputsy.sort_by! {|x, y| y}

comb = [*(0..nn-1)].combination(2).to_a

pd inputs
pd inputsy
pd comb

$statis = {}
comb.each do |c|
  pv = inputs[c[1]][0] - inputs[c[0]][0]
  qv = inputs[c[1]][1] - inputs[c[0]][1]

  if $statis["#{pv},#{qv}"] != nil
    $statis["#{pv},#{qv}"] += 1
  else
    $statis["#{pv},#{qv}"] = 1
  end
  
end

$statisy = {}
comb.each do |c|
  pv = inputsy[c[1]][0] - inputsy[c[0]][0]
  qv = inputsy[c[1]][1] - inputsy[c[0]][1]

  if $statisy["#{pv},#{qv}"] != nil
    $statisy["#{pv},#{qv}"] += 1
  else
    $statisy["#{pv},#{qv}"] = 1
  end
  
end


pd $statis
pd $statisy

tmp_max = 0
$statis.each do |k, v|
  if v > tmp_max
    tmp_max = v
  end
end

$statisy.each do |k, v|
  if v > tmp_max
    tmp_max = v
  end
end

puts (nn - tmp_max)
