Completed prime exercice.