#include<iostream> #include<cmath> using namespace std; int main() { int a,b,c,d=0,e=0; cin>>a;
for(b=0;pow(10,b)<=a;b++){c=pow(10,b);d=a/c;for(d;d>10;d-10)cout<<"";e=e+pow(d,3);}if(e==a)cout<<"YES";else cout<<"NO";}