Team Star Fox collects fuel from N planets. Planet i has Ai fuel cells, and travelling there from anywhere costs Bi fuel. Each planet yields fuel only once. Starting at planet P, they collect its fuel immediately, then may visit other planets in any order while fuel never goes negative. Maximize final fuel, then maximize planets visited among optimal tours.
The first line has N and P. The next N lines contain Ai and Bi.
Print the maximum fuel on the first line and the maximum number of visited planets on the second.