#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); ll x, y, m=1e7, ans=0; cin >> x >> y; m = sqrt(m)+1; vector cnt(3e7); for (int i=-m; i<=m; ++i){ for (int j=-m; j<=m; ++j) cnt[i*i+j*j]++; } for (int i=x; i<=y; i++) ans = max(ans, cnt[i]); cout << ans << endl; return 0; }