Prints prime numbers up to 10000.