#!/usr/bin/env python3
import sys
def d(x, y):
    print(x, y)
    sys.stdout.flush()
    result = int(input())
    if result == 0:
        sys.exit(0)
    return result
limit = 1000000000
d1 = d(0, 0)
d2 = d(limit, 0)
x = (+ limit + d1 - d2) // 2
y = (- limit + d1 + d2) // 2
d(x, y)
assert False # already exited