#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
int n, a[3];
while (cin >> str)
{
if (str.size() != 3)
break;
for (int i = 0; i < str.size(); ++i)
{
a[i] = str[i] - '0';
}
n = stoi(str, 0, 10);
if (n == (a[0] * a[0] * a[0] + a[1] * a[1] * a[1] + a[2] * a[2] * a[2]))
cout << "Yes" << endl;
else
cout << "No" << endl;
}
return 0;
}
zju2736
最新推荐文章于 2013-12-02 23:02:39 发布