program primes; var i,j,o,x:longint; k:integer; l:byte; s, sz:string; p:boolean; begin while (s<>'x') do begin inc(i); p:=true; for j:=2 to round(sqrt(i)) do begin if p and (i mod j=0) then p:=false; end; if p then begin str(i,sz); o:=0; for l:=1 to length(sz) do begin val(sz[l],x,k); o:=o+x; end; if o=7 then begin writeln('jo: ',i:10); readln(s) end; end; end; end.