#include<iostream>
#include<math.h>
using namespace std;
void armstrongNumber(int n);
int main() {
int N;
while (cin >> N) {
armstrongNumber(N);
}
return 0;
}
void armstrongNumber(int n) {
int k = 0, sum = 0;
double d;
int temp = n;
for ( ; temp > 0; ) { //计算位数
temp /= 10;
k++;
}
temp = n;
for ( ; temp > 0; ) {
d = pow(temp % 10, k); //取余数
sum += d;
temp /= 10;
}
if (sum == n) { //判断是否相等
cout << "yes" << endl;
}
else {
cout << "no" << endl;
}
}
输入一个数,并判断其是否为水仙花数