#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int main ()
{
vector<int> vec;
char ss[4];
int num;
for (int i = 100; i < 1000; i++)
{
sprintf (ss , "%d" , i);
if (i == (ss[0]-'0')*(ss[0]-'0')*(ss[0]-'0')+(ss[1]-'0')*(ss[1]-'0')*(ss[1]-'0')+(ss[2]-'0')*(ss[2]-'0')*(ss[2]-'0'))
vec.push_back(i);
}
while (cin>>num)
{
if (find(vec.begin(),vec.end(),num) != vec.end()) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
return 0;
}
注意find()函数的用法,是直接用find()