PROGRAM prime
IMPLICIT NONE
INTEGER::n,i,k,j
READ*,n
PRINT*
DO i=1,n
k=0
DO j=1,i
IF (MOD(i,j)==0) THEN
k=k+1
END IF
END DO
IF (k==2) THEN
PRINT*,i
END IF
END DO
END
PROGRAM prime
IMPLICIT NONE
INTEGER::n,i,k,j
READ*,n
PRINT*
DO i=1,n
k=0
DO j=1,i
IF (MOD(i,j)==0) THEN
k=k+1
END IF
END DO
IF (k==2) THEN
PRINT*,i
END IF
END DO
END