def extract_arguments(fh):
    N, W = map(int, fh.readline().strip().split())
    items = []
    for _ in range(N):
        v, w, m = map(int, fh.readline().strip().split())
        items.append((v, w, m))
    return N, W, items

# if __name__ == "__main__":
#     input_path = sys.argv[1]
#     with open(input_path, 'r') as fh: 
#     N, W, items = extract_arguments(fh)
#     f(N, W, items)