_ = gets
pos = readlines.map {|a| a.split.map(&:to_i) }
p,q = pos.each_cons(2).map {|a,b| [b[0] - a[0], b[1] - a[1]] }
         .group_by(&:itself).max_by {|k,v| v.size }[0]
puts pos.each_cons(2).count {|a,b| b[0]-p != a[0] || b[1]-q != a[1] } + 1