package y202; import java.io.IOException; import java.util.ArrayList; public class Main { static int nextInt() { int c; try { c = System.in.read(); while(c != '-' && (c < '0' || c > '9')) c = System.in.read(); if(c == '-') return -nextInt(); int res = 0; while(c >= '0' && c <= '9') { res = res * 10 + c - '0'; c = System.in.read(); } return res; } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return -1; } public static void main(String[] args) { int LEN = 1002; int N = nextInt(); ArrayList B[][] = new ArrayList[LEN][LEN]; int ans = 0; L:for(int i = 0; i < N; i++) { int x = nextInt(); int y = nextInt(); int ix = x/20; int iy = y/20; for(int dx = -1; dx <= 1; dx++) for(int dy = -1; dy <= 1; dy++) { int tx = ix + dx; int ty = iy + dy; if(tx < 0 || LEN <= tx || ty < 0 || LEN <= ty || B[tx][ty] == null) continue; for(int c[]: B[tx][ty]) { int ox = c[0]; int oy = c[1]; if((ox - x)*(ox - x) + (oy - y)*(oy - y) < 400) { continue L; } } } if(B[ix][iy] == null) { B[ix][iy] = new ArrayList(); } B[ix][iy].add(new int[]{x, y}); ans++; } System.out.println(ans); } }