#include #define _GLIBCXX_DEBUG #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main(){ int X, Y; cin >> X >> Y; int upper = sqrt(Y)+1; int c; vector r(2*Y+1); rep(a, upper){ for (int b=a; b < upper; b++){ c = a*a+b*b; if (a==0 || a==b) { r[c] += 4; } else{ r[c] += 8; } } } int ans = 0; for (int x=X;x