def isPowerOfTwo(n):
    # Check if n is greater than zero
    if n <= 0:
        return False
    # Check using bitwise operation
    return (n & (n - 1)) == 0

# Request input from the user
try:
    n = int(input("أدخل عددًا للتحقق مما إذا كان قوة للعدد 2: "))
    # Print the result: صحيح أو خطأ
    result = "صحيح" if isPowerOfTwo(n) else "خطأ"
    print(result)
except ValueError:
    print("يرجى إدخال عدد صحيح.")

