
Program Primes (Input,Output);

Var
   i, j, charline : Integer;

Begin
   charline := 0;
   i := 3;
   Repeat 
      j := 3;
      While (i MOD j <> 0) and (j <= Trunc(Sqrt(i))) Do
         j := j + 1;
      If j > Trunc(Sqrt(i)) Then
       Begin
         charline := charline + 6; 
         Write(i:6);
         If charline > 72 Then
           Begin
             charline := 0;
             Writeln;
           End;
       End;
      i := i + 2;
   Until i >= MaxInt-1;
End.
