#include<iostream>
using namespace std;
int main()
{
int r,n,i,temp,len=0,x=0;
cin>>n;
temp=n;
for(i=0; i<3; i++)
{
r=n%10;
x+=(r*r*r);
n=n/10;
cout<<r<<" "<<n<<" "<<x<<"\n";
}
if(temp==x)
cout<<"yes\n";
else
cout<<"no\n";
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKICAgIGludCByLG4saSx0ZW1wLGxlbj0wLHg9MDsKICAgIGNpbj4+bjsKICAgIHRlbXA9bjsKICAgIGZvcihpPTA7IGk8MzsgaSsrKQogICAgewogICAgICAgIHI9biUxMDsKICAgICAgICB4Kz0ocipyKnIpOwogICAgICAgIG49bi8xMDsKICAgICAgICBjb3V0PDxyPDwiICI8PG48PCIgIjw8eDw8IlxuIjsKICAgIH0KICAgIGlmKHRlbXA9PXgpCiAgICAgICAgY291dDw8Inllc1xuIjsKICAgIGVsc2UKICAgICAgICBjb3V0PDwibm9cbiI7CiAgICAgICAgCiAgICByZXR1cm4gMDsKfQo=