import collections def read_data(): N = int(input()) XY = [] for i in range(N): x, y = map(int, input().split()) XY.append((x, y)) return N, XY def solve(N, XY, r = 10, size = 50): cells = collections.defaultdict(list) count = 0 threshold = 4 * r * r for x, y in XY: if not overlap(x, y, cells, size, threshold): count += 1 register_cell(x, y, cells, size) return count def overlap(x, y, cells, size, threshold): xc = x // size yc = y // size for xr in [xc-1, xc, xc+1]: for yr in [yc-1, yc, yc+1]: if (xr, yr) in cells: for xx, yy in cells[xr, yr]: if (x - xx) ** 2 + (y - yy) ** 2 < threshold: return True return False def register_cell(x, y, cells, size): xc = x // size yc = y // size cells[xc, yc].append((x, y)) if __name__ == "__main__": N, XY = read_data() print(solve(N, XY))