# algorytm euklidesa
def nwd(a,b):
while a!=b:
if a>b:
a=a-b
elif a<b:
b=b-a
return a
print(nwd(17,24))
IyBhbGdvcnl0bSBldWtsaWRlc2EKZGVmIG53ZChhLGIpOgoJd2hpbGUgYSE9YjoKCQlpZiBhPmI6CgkJCWE9YS1iCgkJZWxpZiBhPGI6CgkJCWI9Yi1hCglyZXR1cm4gYQpwcmludChud2QoMTcsMjQpKQ==