In the coin collectors' club, there are members. The club is currently holding a contest to see who will be the first to assemble a complete collection of 19th-century coins. According to the club's rules, this collection must include different types of coins. While members may have several coins of the same type, they must possess at least one coin of each type.
Vasya is determined to approach this task seriously and wants to determine the optimal coin exchange strategy. He knows that any collector will happily trade one of their coins of type for one of Vasya's coins of type if, and only if, the collector has more than one coin of type but does not have any coins of type . Collectors do not agree to any other exchanges. Vasya, however, unlike the others, values overall optimization above immediate gain and, if he wishes, may ignore this rule.
Vasya wishes to use such exchanges to collect as many different types of coins as possible, thus making it easier to win the contest in the future. Help him determine the optimal exchange plan!
The first line of the input file contains two integers and (1 \leq m, n \leq 100). The following lines each contain integers: the -th integer on the -th line represents the number of coins of the -th type possessed by the -th collector. All these integers are non-negative and do not exceed . Vasya is collector number .
On the first line of the output file, print the maximum number of different types of coins that can be collected. Then output any sequence of exchanges that achieves this number of types. Each exchange should be presented in the format x_i, u_i, v_i, where x_i is the number of the collector Vasya exchanges with, u_i is the type of coin Vasya receives, and v_i is the type of coin Vasya gives.
Example 1