N = gets.to_i
a = [nil]*(N*(N+1)/2)
N.times{|i|
	xy = gets.split.map(&:to_i)
	a[i] = xy
	i.times{|j|
		a[-1-i*(i-1)/2-j] = a[i][0]<a[j][0]||a[i][1]<a[j][1] ? [a[j][0]-a[i][0], a[j][1]-a[i][1]] : [a[i][0]-a[j][0], a[i][1]-a[j][1]]
	}
}
p N-a[N,a.size-N].sort.chunk{|d|d}.map{|d,c|c.size}.max
