#include<iostream>
using namespace std;
int main()
{
int g,s,b,f,t,a;
cin>>a;
g=a%10;
s=a/10%10;
b=a/100;
f=g+s+b;
cout<<f<<endl;
if (g>s) {
int t=g;
g=s;
s=t;
}
if (g>b) {
int t=g;
g=b;
b=t;
}
if (s>b) {
int t=s;
s=b;
b=t;
}
if (g+1==s && s+1==b)
cout<<"yes";
else
cout<<"no";
return 0;
}