var
m,s,t:longint;
ok:boolean;
min:longint;
a,b,c,d,e,f,g,x,l:longint;
function ceil(r:real):longint;
var
i:longint;
begin
i:=trunc(r);
if abs(r-i)<1E-5 then ceil:=i
else ceil:=i+1;
end;
function minu(i,j:longint):longint;
begin
if i>j then minu:=j else minu:=i
end;
begin
read(m,s,t);
min:=maxlongint;;
if s=0 then begin
writeln(0);
halt;
end;
for g:=0 to 10 do begin
f:=s;{剩余路程}
e:=g;{现在时间}
x:=m;{现在魔法}
f:=f-g*17;
if f<=0 then
if e<=min then begin
min:=e;
break;
end;
if f<0 then break;
d:=ceil(f/60);
e:=e+d;
if x<10*d then e:=e+ceil((10*d-x)/4);
if e<min then min:=e;
end;
l:=0;
if min>t then for g:=0 to 10 do begin
f:=g*17;{路程}
x:=m;{现在魔法}
e:=t-g;{剩余时间}
if e<0 then continue;
b:=minu(e,m div 10);
f:=f+b*60;
if e<0 then continue;
if f>l then l:=f;
e:=e-b;
x:=x-b*10;
if e=0 then continue;
while e>0 do begin{这里暴力了点,可以直接mod 7进行计算,再while}
if x>=10 then begin
x:=x-10;
f:=f+60;
end else x:=x+4;
dec(e);
end;
if f>l then l:=f;
end;
if min<=t then begin
writeln(Yes);
writeln(min);
end else begin
writeln(No);
writeln(l);
end;
end.