# algorytm euklidesa
a=7
b=9
def nwd(a,b):
while a!=b:
if a>b:
a=a-b
elif a<b:
b=b-a
return a
print(nwd(a,b))
print(a,'' '' '',a/nwd(a,b))
print('-','=','-')
print(b,'' '' '',b/nwd(a,b))
IyBhbGdvcnl0bSBldWtsaWRlc2EKYT03CmI9OQpkZWYgbndkKGEsYik6Cgl3aGlsZSBhIT1iOgoJCWlmIGE+YjoKCQkJYT1hLWIKCQllbGlmIGE8YjoKCQkJYj1iLWEKCXJldHVybiBhIApwcmludChud2QoYSxiKSkKcHJpbnQoYSwnJyAnJyAnJyxhL253ZChhLGIpKQpwcmludCgnLScsJz0nLCctJykKcHJpbnQoYiwnJyAnJyAnJyxiL253ZChhLGIpKQ==