import sys from collections import defaultdict def main(): n = int(sys.stdin.readline()) grid_map = defaultdict(list) count = 0 for _ in range(n): x, y = map(int, sys.stdin.readline().split()) cell_x = x // 20 cell_y = y // 20 valid = True # Check adjacent cells (including current) for dx in (-1, 0, 1): for dy in (-1, 0, 1): adj_cell_x = cell_x + dx adj_cell_y = cell_y + dy # Check each coin in the adjacent cell for (ox, oy) in grid_map.get((adj_cell_x, adj_cell_y), []): dx_p = x - ox dy_p = y - oy dist_sq = dx_p * dx_p + dy_p * dy_p if dist_sq < 400: valid = False break # Break out of the current for-loop over coins if not valid: break # Break out of dy loop if not valid: break # Break out of dx loop if valid: grid_map[(cell_x, cell_y)].append((x, y)) count += 1 print(count) if __name__ == '__main__': main()