def dist(ax, ay, bx, by): return (ax - bx) ** 2 + (ay - by) ** 2 N = int(raw_input()) X = [set([]) for i in xrange(20021)] Y = [set([]) for i in xrange(20021)] ans = 0 for loop in xrange(N): x, y = map(int, raw_input().split()) cand = X[i] & Y[i] for cx, cy in cand: if dist(x, y, cx, cy) < 400: break else: for xi in xrange(max(0, x - 20), x + 20): X[xi].add((x, y)) for yi in xrange(max(0, y - 20), y + 20): Y[yi].add((x, y)) ans +=1 print ans