N = gets.to_i
ps = N.times.map { gets.split(' ').map(&:to_i) }

cnt = {}
0.upto(N-2) { |i|
  i.succ.upto(N-1) { |j|
    ip = ps[i]
    jp = ps[j]
    d = [ip[0] - jp[0], ip[1] - jp[1]]
    cnt[d] ||= 0
    cnt[d] += 1
  }
}

max_d = nil
max_cnt = 0
cnt.each { |key, val|
  if val > max_cnt
    max_cnt = val
    max_d = key
  end
}

puts (N - max_cnt)
