m,n = input().split() m = int(m) n = int(n) t = m while True: if m%t==0 and n%t==0: break t = t-1 print(t) """ Ctrl + A Ctrl + C Ctrl + V """