#include #include using namespace std; using namespace atcoder; #define rep(i,m,n) for (int i = (int)(m); i < (int)(n); i++) #define ll long long int main(){ ll x,y; cin >> x >> y ; vector m(10000001); ll v; rep(i,-3163,3163){ rep(j,-3163,3163){ v = i*i + j*j; if (v<=y){ m[v]++; }} } ll ans = 0; rep(i,x,y+1){ ans = max(ans,m[i]); }; cout << ans << endl; return 0; }