N = input() inputs = [map(int,raw_input().split(" ")) for i in range(N)] class AABB: def __init__(self): pass def marge(ab1,ab2): ret = AABB() ret.left = min(ab1.left,ab2.left) ret.right = max(ab1.right,ab2.right) ret.up = min(ab1.up,ab2.up) ret.down = max(ab1.down,ab2.down) ret.children = [ab1,ab2] def nyrn(self,x,y): self.left = x - 10 self.right = x + 10 self.up = y - 10 self.down = y + 10 self.x = x self.y = y self.children = -1 def search(self,cx,cy): if cx+10 > self.left and cx-10 < self.right: if cy-10 self.up: if self.children == -1: return (self.x-cx)**2+(self.y-cy)**2 < 400 else: for c in children: if c.search(cx,cy): return True aabb = AABB() aabb.nyrn(inputs[0][0],inputs[0][1]) ans = 1 nyrns = [[] for i in range(17)] nyrns[0].append(aabb) for x,y in inputs[1:]: flag = False for i in range(17): for c in nyrns[i]: if c.search(x,y): flag = True if flag: pass else: ans+=1 new_aabb = AABB() new_aabb.nyrn(x,y) nyrns[0].append(new_aabb) for i in range(17): if len(nyrns[i] )>2: xx = nyrns[i].pop(0) yy = nyrns[i].pop(0) zz = AABB.marge(xx,yy) nyrns[i+1].append(zz) print ans