Problem B. Beach Hockey

Author:Антон Карабанов   Time limit:1 sec
Input file:Standard input   Memory limit:256 Mb
Output file:Standard output  

Statement

On a Pacific island, there are two kinds of people: knights, who always tell the truth, and liars, who always lie. A traditional island game is team beach hockey. The rules are the same as in regular hockey, but each team consists of exactly two players, and either both players are knights, or both are liars.

A sports journalist, Timofey, was sent from Moscow to cover the final match of the island's cup. However, due to a delayed flight, he missed the game. The final score "Knights — a, Liars — b" is displayed on the scoreboard, and the players are finishing their interviews with journalists and fans. Timofey managed to ask each player how many goals they scored. Your task is to help Timofey determine the team compositions.

Input format

The first line of input contains two non-negative integers, a (the number of goals scored by the knights) and b (the number of goals scored by the liars), which represent the final score of the game. The second line contains four non-negative integers xi — the number of goals each of the four players claims to have scored, listed in non-decreasing order.

Output format

In the first line of output, print a natural number n — the number of possible knight team compositions. In the following n lines, print two natural numbers representing the indices of the players who are knights, in increasing order. Print the lines in ascending order of the first player’s number.

The input is guaranteed to be consistent, meaning that at least one valid knight team composition exists based on the input.

Constraints

0 ≤ a, b, xi ≤ 10

Example explanation

For example, if the knights won with a score of 5-4, there are two possibilities:

The first and fourth players are knights. They told the truth (the first scored 1 goal, the fourth scored 4). The second and third players are liars. They lied (the second could have scored 2 goals instead of 1, and the third could have scored 2 instead of 3).

The second and fourth players are knights (reasoning is similar).

Sample tests

No. Standard input Standard output
1
5 4
1 1 3 4
2
1 4
2 4

0.077s 0.010s 13