class Solution: def isThree(self, n: int) -> bool: count = 1 for num in range(2, n // 2 + 1): if n % num == 0: count += 2 if count > 3: break return count == 3