f=lambda a,b:a<2or b-b*f(b%a,a)/a while 1:print f(*map(int,raw_input().split()))
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page