program determines if a number is prime or not