n = gets.to_i
xs = []
ys = []
ph = Hash.new(0)
n.times { |i|
  x,y = gets.split.map {|x| x.to_i}
  xs << x
  ys << y
}

n.times { |i|
  n.times { |j|
    if i != j
      dx = xs[j] - xs[i]
      dy = ys[j] - ys[i]
      ph[[dx,dy]] += 1
      ph[[-dx,-dy]] += 1
    end
  }
}

def search(h)
  maxk = 0
  maxv = 0
  h.each { |k,v|
    if maxv < v
      maxv = v
      maxk = k
    end
  }
  return maxk
end


p = search(ph)
#puts "#{p}"

def cost(xs, ys, p, i)
  #puts i
  i.times { |j|
      #puts "#{xs[j]} #{xs[i]} #{xs[j]-xs[i]} == #{p[0]} #{ys[j] - ys[i]} == #{p[1]}"
      if xs[j] - xs[i] == p[0] and ys[j] - ys[i] == p[1]
        return 0
      end
      if xs[i] - xs[j] == p[0] and ys[i] - ys[j] == p[1]
        return 0
      end
  }
  return 1
end

s = 0
n.times { |i|
  v = cost(xs, ys, p, i)
  #puts "v=#{v}"
  s += v
}
puts s


