def extract_arguments(fh):
    inputs = []
    while True:
        line = fh.readline().strip()
        if line == "0 0":
            break
        n, w = map(int, line.split())
        values = [int(fh.readline().strip()) for _ in range(n)]
        inputs.append((n, w, values))
    return inputs

# if __name__ == "__main__":
#     input_path = sys.argv[1]
#     with open(input_path, 'r') as fh:
#         inputs = extract_arguments(fh)
#         for args in inputs:
#             f(*args)