int main()
{
	//freopen("in.txt","r",stdin);
	int t, n;
	ll int a,b,c,k;
	SET(hash,-1);
	ETF();int inv;
//	CO(phi[1]<<"this is phi6")
	for(scanf("%d",&t);t;t--)
	{
	 S(a);S(b);S(c);S(k);
	 if(hash[k]==-1){printf("No\n");continue;}
		//CO("this is k"<<k)
		inv=hash[k]; 
	    //CO("this is inv "<<inv)
	     //CO(inv<<"this has the totient")
	    // CO("this is the diff "<<(4*a*(c-inv))<<" "<<b)
	    // CO(c<<"this is c and a "<<a)
	     ll int x=b*b;ll int y=4*a*(c-inv);
	    // CO(x<<" y is "<<y)
	     ll int ch=x-y;;
	     //CO(ch<<"this is a check")
	     if(ch>=0)
	 	{                      
	 	printf("Yes\n");	
	 	}
		else
		{
		printf("No\n");	
		}
		//scanf("%d",&n);
		//printf("%d\n",phi[n]);
	}
	return 0;
}
Example #2
0
int main()
{
    unsigned t, n;
    ETF();
    for(scanf("%d",&t); t; t--)
    {
        scanf("%d",&n);
        printf("%d\n",phi[n]);
    }
    return 0;
}