output_description: Print two integers x and y separated by a space. If there are several pairs of
  such x and y, print that pair for which |x| + |y| is the minimal (primarily)
  and x ≤ y (secondarily).
input_description: a b
      
  
  Two positive integers a and b are given separated by a space in a line.
attempt: a, b = map(int, input().split())
  c = g = 1
  e = f = 0
  while b:
      d, m = divmod(a, b)
      h = c - d * e
      i = f - d * g
      a, b = b, m
      c, e = e, h
      f, g = g, i
  print(c, f)
  
problem_description: Extended Euclid Algorithm
  
    
  
  Given positive integers a and b, find the integer solution (x, y) to ax + by =
  gcd(a, b), where gcd(a, b) is the greatest common divisor of a and b.
samples: [{"input": "4 12", "output": "1 0"}, {"input": "3 8", "output": "3 -1"}]