var i,j,n:longint; function isp(x:longint):boolean; begin { j:=trunc(sqrt(x)); for i:=2 to j do begin if x mod i=0 then begin isp:=false; exit; end; end; isp:=true;} isp:=(x mod 6=1) or (x mod 6=5); end; begin read(n); while n<>0 do begin if isp(n) then writeln('Kralovny lze umistit.') else writeln('Kralovny se nevejdou.'); read(n); end; end.