#include <stdio.h>
void Func_Bit_Sum(int *Tmp_Sum, int n)
{
int i_Number = *Tmp_Sum;
int Sum_Number = 1;
while(n--)
{
Sum_Number *= i_Number;
}
*Tmp_Sum = Sum_Number;
}
void Func_Ten(int *Ten_Num,int n)
{
int Tmp = *Ten_Num;
if(1 == n)
{
*Ten_Num = 1;
}
while(n >= 2)
{
Tmp *= 10;
n--;
}
*Ten_Num = Tmp;
}
int func_is_flower_number(int Number)
{
if(Number < 0)
return -1;
int iTmp_Size = Number;
int Number_Size = 0;
while(iTmp_Size > 0)
{
iTmp_Size /= 10;
Number_Size++;
}
int Bits = Number_Size;
int iTmp_Val = Number;
int Bit_Val;
int Sum_bits = 0;
while(iTmp_Val > 0)
{
int ten_num = 1;
Func_Ten(&ten_num, Number_Size--);
Bit_Val = iTmp_Val / ten_num;
iTmp_Val -= Bit_Val * ten_num;
Func_Bit_Sum(&Bit_Val, Bits);
Sum_bits += Bit_Val;
}
if(Sum_bits == Number)
return 0;
else
return -1;
}
int main()
{
int i_Num;
int iRet = -1;
scanf("%d",&i_Num);
getchar();
iRet = func_is_flower_number(i_Num);
if(0 == iRet)
printf("Yes!\r\n");
else
printf("No!\r\n");
return 0;
}
void Func_Bit_Sum(int *Tmp_Sum, int n)
{
int i_Number = *Tmp_Sum;
int Sum_Number = 1;
while(n--)
{
Sum_Number *= i_Number;
}
*Tmp_Sum = Sum_Number;
}
void Func_Ten(int *Ten_Num,int n)
{
int Tmp = *Ten_Num;
if(1 == n)
{
*Ten_Num = 1;
}
while(n >= 2)
{
Tmp *= 10;
n--;
}
*Ten_Num = Tmp;
}
int func_is_flower_number(int Number)
{
if(Number < 0)
return -1;
int iTmp_Size = Number;
int Number_Size = 0;
while(iTmp_Size > 0)
{
iTmp_Size /= 10;
Number_Size++;
}
int Bits = Number_Size;
int iTmp_Val = Number;
int Bit_Val;
int Sum_bits = 0;
while(iTmp_Val > 0)
{
int ten_num = 1;
Func_Ten(&ten_num, Number_Size--);
Bit_Val = iTmp_Val / ten_num;
iTmp_Val -= Bit_Val * ten_num;
Func_Bit_Sum(&Bit_Val, Bits);
Sum_bits += Bit_Val;
}
if(Sum_bits == Number)
return 0;
else
return -1;
}
int main()
{
int i_Num;
int iRet = -1;
scanf("%d",&i_Num);
getchar();
iRet = func_is_flower_number(i_Num);
if(0 == iRet)
printf("Yes!\r\n");
else
printf("No!\r\n");
return 0;
}