<?php

// your code goes here


function printPrimes($n) {
    $i = 2;
    echo $i . PHP_EOL;
    $count = 1;
    while(true) {
    	++$i;
    	$isPrime = true;
    	for($j=2;$j<=sqrt($i);++$j) {
    		if ($i % $j == 0) 
    		    $isPrime = false;
    	}
    	
    	if ($isPrime) {
    		echo $i . PHP_EOL;
    		$count++;
    	}
    	
    	if ($count == $n)
    	    break;
    }	
	
}


printPrimes(10);