#include #define rep(i, a, n) for(int i = a; i < n; i++) #define repr(i, a, b) for(int i = a; i >= b; i--) #define int long long #define all(a) a.begin(), a.end() #define chmax(x, y) x = max(x, y) #define chmin(x, y) x = min(x, y) using namespace std; typedef pair P; const int mod = 1000000007; const int INF = 1e18; const int MAX_N = 10000010; int prime[MAX_N]; bool is_prime[MAX_N + 1]; int pf[MAX_N]; int sieve(int n){ int p = 0; for(int i = 0; i <= n; i++) is_prime[i] = true; is_prime[0] = is_prime[1] = false; for(int i = 2; i <= n; i++){ if(is_prime[i]){ prime[p++] = i; for(int j = 2*i; j <= n; j += i){ is_prime[j] = false; pf[j] = i; } } } return p; } int prime_factor(int n){ int res = 1; while(n != 1){ int now = pf[n]; if(now == 0){ if(now % 4 == 1) res *= 2; else res = 0; break; } int cnt = 0; while(n % now == 0){ n /= now; cnt++; } if(now % 4 == 1) res *= cnt + 1; else return 0; } return res * 4; } signed main(){ ios::sync_with_stdio(false); cin.tie(0); sieve(MAX_N); int x, y; cin >> x >> y; int ans = 0; for(int i = x; i <= y; i++){ ans = max(ans, prime_factor(i)); } cout << ans << endl; }