Ответ:
var a,d,b,i,f,k: integer;
begin
readln(a);
for i:=1 to a do
begin
b:=b+1;
if (b=5) then
begin
b:=0;
d:=d+1;
end;
end;
for i:=1 to (a*2)-50 do
begin
f:=f+1;
if (f=3) then
begin
f:=0;
k:=k+1;
end;
end;
writeln('1: ',2*a,' ',(2*a)*20);
writeln('2: ',a-d,' ',(a-d)*15);
writeln('3: ',(a*2)-50,' ',((a*2)-50)*10);
end.