var d,k: integer;
begin
write ('d = ');
readln (d);
write ('k = ');
readln (k);
if k<18 then writeln ('F = 4d + 9 = ',4*d + 9) else
if k>25 then writeln ('F = 8 - d = ',8 - d) else
writeln ('F = 10 - d^2 = ',10 - d*d)
end.
var d,k: integer;
begin
write ('d = ');
readln (d);
write ('k = ');
readln (k);
if k<18 then writeln ('F = 4d + 9 = ',4*d + 9) else
if k>25 then writeln ('F = 8 - d = ',8 - d) else
writeln ('F = 10 - d^2 = ',10 - d*d)
end.