def extract_arguments(fh):
    inputs = []
    while True:
        line = fh.readline().strip()
        if line == "0 0":
            break
        n, x = map(int, line.split())
        inputs.append((n, x))
    return inputs