program a;
var a,b:real;
n: integer;
begin
repeat
write('Введите число от 0 до 24 два раза xx.xx');
readln(a, b);
n:=0;
if (1<=a) and (a<13) then n:=n+1</p>
else if (0<=a) and (a<=24) then n:=n+2;</p>
if (1<=b) and (b<3) then n:=n+1</p>
else if (0<=b) and (b<=24) then n:=n+2;</p>
if n<2 then write ('12-hour clock')</p>
else if n>2 then write ('24-hour clock');
if n=2 then white ('both');
end.