#include using namespace std; #define all(x) (x).begin(),(x).end() #define SP <<" "<< #define MOD 1000000007 #define IINF 1000000000 #define LINF 1000000000000000000 typedef long long LL; typedef long double LD; int main(){ int n,d; cin >> n >> d; vector p(n*n); for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ p[(i-1)*n+j-1]=i*i+j*j; } } sort(all(p)); map mp; int count=1; for(int i=1;isecond; } } cout << ans << endl; return 0; }