add logical operator that tests if prime number is also a factor of given number