program paisprezece; var n,i,s:integer; f:text; function prim(n:integer):boolean; var i:integer; begin prim:=true; for i:=2 to n-1 do if n mod i=0 then prim:=false; end; begin assign(f,'in.txt'); reset(f); s:=0; while not eof(f) do begin readln(f,n); if prim(n)=false then s:=s+n; end; close(f); append(f); writeln(f); writeln(f,s); close(f); end.