def bezout(a,b):
    r = 0
    u = 0
    while r != 1:
        u = u + 1
      r = a*u%b
    v = int((1–a*u)/b)
    return u,v
