/** * @FileName a.cpp * @Author kanpurin * @Created 2020.05.22 23:28:25 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int n;cin >> n; vector> g(20001,vector(20001,false)); int ans = 0; vector dx,dy; for (int i = -20; i <= 20; i++) { for (int j = -20; j <= 20; j++) { if (i * i + j * j < 400) { dx.push_back(i); dy.push_back(j); } } } for (int i = 0; i < n; i++) { int a,b;cin >> a >> b; if (g[a][b]) continue; for (int k = 0; k < dx.size(); k++) { int x = a + dx[k], y = b + dy[k]; if (x >= 0 && x <= 20000 && y >= 0 && y <= 20000) { g[x][y] = true; } } ans++; } cout << ans << endl; return 0; }