import sys
import math

x1 = 0
y1 = 0

x2 = 199
y2 = 0

x3 = 0
y3 = 199

x4 = 199
y4 = 199

xlim = 200
ylim = 200

xlast = True
ylast = True


def scanx(x):
    for y in range(200):
        sys.stdout.flush()
        sys.stdout.write(str(x) + " " + str(y) + "\n")
        line = sys.stdin.readline()
        alt = int(line.strip())
        if alt == 0:
            return True
    return False



def scany(y):
    for x in range(200):
        sys.stdout.flush()
        sys.stdout.write(str(x) + " " + str(y) + "\n")
        line = sys.stdin.readline()
        alt = int(line.strip())
        if alt == 0:
            return True
    return False




while True:
    sys.stdout.flush()
    sys.stdout.write(str(x1) + " " + str(y1) + "\n")
    line = sys.stdin.readline()
    alt1 = int(line.strip())

    sys.stdout.flush()
    sys.stdout.write(str(x2) + " " + str(y2) + "\n")
    line = sys.stdin.readline()
    alt2 = int(line.strip())

    sys.stdout.flush()
    sys.stdout.write(str(x3) + " " + str(y3) + "\n")
    line = sys.stdin.readline()
    alt3 = int(line.strip())

    sys.stdout.flush()
    sys.stdout.write(str(x4) + " " + str(y4) + "\n")
    line = sys.stdin.readline()
    alt4 = int(line.strip())

    if(alt1 == 0 or alt2 == 0 or alt3 == 0 or alt4 == 0):
        break

    if alt1 * alt2 > 0:
        x1 += 1
        x2 += 1

    else:
        scanx(x1)

    if alt1 * alt3 > 0:
        y1 += 1
        y3 += 1
    else:
        scany(y1)

    if alt3 * alt4 >0:
        x3 -= 1
        x4 -= 1
    else:
        scanx(x3)

    if alt4 * alt2 > 0:
        y4 -= 1
        y2 -= 1
    else:
        scany(y4)