https://codeforces.com/problemset/problem/1490/C
开三次方然后暴力枚举判断即可
#include<iostream>
#include<cmath>
using namespace std;
typedef long long ll;
void solved()
{
ll n;
cin>>n;
ll a,b;
for(ll i=1;i<=cbrt(n);i++)
{
b=n-(i*i*i);
ll t=cbrt(b);
if(t*t*t==b&&t>0)
{
cout<<"YES"<<endl;
return ;
}
}
cout<<"NO"<<endl;
return ;
}
int main()
{
int t;
cin>>t;
while(t--)
{
solved();
}
return 0;
}