def is_power_of_two(n: int) -> bool:
    return n > 0 and (n & (n - 1)) == 0

# Input from user
try:
    user_input = int(input("Enter an integer: "))
    
    result = is_power_of_two(user_input)

    # Formatted output
    print(f"Is {user_input} a power of two? {result}")
    
    if result:
        # Calculate x without loops or recursion
        x = user_input.bit_length() - 1  # Get the position of the highest set bit
        print(f"Explanation: 2^{x} = {1 << x} = {user_input}")
    else:
        print("Explanation: The number is not a power of two.")
        
except ValueError:
    print("Please enter a valid integer.")