case statement for prime numbers