It detects if a number is prime and returns true, else false