import sys while True: try: n, V = map(int, input().split()) lv, lw = [], [] for i in range(n): l = list(map(int, input().split())) lv.append(l[0]) lw.append(l[1]) dp = [0 for _ in range(V + 1)] dp2 =[float("-inf...