from collections import defaultdict def lap(bin, x, y, dx, dy, xx, yy): for xxx in xx: for yyy in yy: for bx, by in bin[dx + xxx, dy + yyy]: if (bx - x) ** 2 + (by - y) ** 2 < 400: return True for xxx in xx: for yyy in yy: bin[dx + xxx, dy + yyy].append((x, y)) return False def solve(XY): bin = defaultdict(list) count = 0 for x, y in XY: dx, mx = divmod(x, 20) dy, my = divmod(x, 20) xx = [0] if mx < 10: xx.append(-1) elif mx > 10: xx.append(1) yy = [0] if my < 10: yy.append(-1) elif my > 10: yy.append(1) if not lap(bin, x, y, dx, dy, xx, yy): count += 1 return count def main(): N = int(input()) XY = [list(map(int, input().split())) for i in range(N)] print(solve(XY)) if __name__ == '__main__': main()