var a,s:integer;
Begin
read(a);
repeat
s:=s+a mod 10;
a:=a div 10
until a=10;
if (s<100) and (s>9) then write('Yes')
else write('No');
End.
var a,s:integer;
Begin
read(a);
repeat
s:=s+a mod 10;
a:=a div 10
until a=10;
if (s<100) and (s>9) then write('Yes')
else write('No');
End.