program escape;
var
f1,f2:text;
i,j,m,n,s,t:longint;
time,sl:longint;
flag:boolean;
procedure jump;
begin
s:=s-60;
t:=t-1;
m:=m-10;
end;
procedure xiujump;
begin
while m<10 do begin
dec(t);
m:=m+4;
end;
jump;
end;
begin
assign(f1,'escape.in');reset(f1);
assign(f2,'escape.out');rewrite(f2);
readln(f1,m,s,t);
time:=t; sl:=s;
while (t>0)and(s>0) do
begin
if m>=10 then jump
else
if t>=7 then
xiujump
else
if t<7 then
while (t>0)and(s>0) do begin
dec(t); s:=s-17;
end;
end;
if s<=0 then begin writeln(f2,'Yes');
t:=time-t;
writeln(f2,t);
end;
if t<=0 then begin writeln(f2,'No');
s:=sl-s;
writeln(f2,s);
end;
close(f2);
end.