d = [[[] for _ in range(1002)] for _ in range(1002)] n = int(input()) ans = 0 for _ in range(n): x,y = map(int,input().split()) px,py = x//20, y//20 ok = 1 for i in range(-1,2): for j in range(-1,2): if px+i < 0 or py+j < 0: continue for v,w in d[px+i][py+j]: if (x-v)**2 + (y-w)**2 < 400: ok = 0 if ok: ans += 1 d[px][py].append((x,y)) print(ans)