#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 ; ll m[10000001]; rep(i,-3163,3163){ rep(j,-3163,3163){ ll v = i*i + j*j; if (v<=y){ m[i*i + j*j] += 1; }} } ll ans = 0; rep(i,x,y+1){ ans = max(ans,m[i]); }; cout << ans << endl; return 0; }