x0 = 0 x1 = 10**5 y0 = 0 y1 = 10**5 cnt = 0 A = [] while True: if cnt%4==0: a = (3*x0+x1)//4 b = (3*y0+y1)//4 elif cnt%4==1: a = (x0+3*x1)//4 b = (3*y0+y1)//4 elif cnt%4==2: a = (x0+3*x1)//4 b = (y0+3*y1)//4 else: a = (3*x0+x1)//4 b = (y0+3*y1)//4 print(a,b) d = int(input()) if d==0:break A.append((a,b,cnt,d)) if cnt%4==3: dmin = 10**9 for i in range(4): a,b,cnt,d = A[i] if d