a = int(input())
b = int(input())
R = a % b

while (b != 0):
    R = a % b
    a = b
    b = R
print(a)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: