using System; using System.Collections.Generic; using System.Collections; using System.Collections.Specialized; using System.Linq; using System.Text; using System.IO; using System.Reflection; using static System.Math; using System.Numerics; static class Program{ const int mod=(int)1e9+7; const double eps=1e-11; static void Main(){ Sc sc=new Sc(); var s=sc.Ia; const int inf=4000001; var h=new int[inf]; for(int i = 1;i<=s[0];i++) { for(int j = i;j<=s[0];j++) {h[j*j-i*i]++;} } long ans=0; for(int i = 1;i<=s[0];i++) { for(int j = i;j<=s[0];j++) { long p=Abs(i*i+j*j-s[1]); if(p(int n,Func f){var a=new T[n];for(int i=0;i(int n,Func f){var a=new T[n];for(int i=0;i(int n,Func f){var a=new T[n];for(int i=0;i(int n,Func f){var a=new T[n];for(int i=0;i