def gcd(a, b):
    while b != 0:
        print("a = ", a, "b = ", b, "a % b = ", a % b)
        a, b = b, a % b  #  a % b is the remainder of a divided by b
    return a

# Input two integers
num1 = int(input("Enter the first integer: "))
num2 = int(input("Enter the second integer: "))

# Calculate the GCD using the Euclidean algorithm
result = gcd(num1, num2)

# Print the GCD
print("The GCD of", num1, "and", num2, "is:", result)