check if input is prime