Detects that a number is prime