1 #include<iostream>
2 #include<cmath>
3 using namespace std;
4 int tot=0;
5 int main()
6 {
7 int n;
8 cin>>n;
9 int j=n;
10 while(n!=0)
11 {
12 int a=n%10;
13 double p=(double)pow(a,3);
14 tot=tot+p;
15 n=n/10;
16 }
17 if(tot==j)
18 {
19 cout<<"YES";
20 }
21 else
22 {
23 cout<<"NO";
24 }
25 return 0;
26 }