import math

def is_power_of_two(n: int) -> bool:
    if n <= 0:
        return False
    return math.log2(n).is_integer()

# Example usage:
print(is_power_of_two(1))   
print(is_power_of_two(16)) 
print(is_power_of_two(3))  