Joint Venture
Liesbeth and Jan are building a robot for a course project and have discovered that they need to fit two pieces of Lego into an opening.
The opening is x centimetres wide and the sum of the lengths of the two pieces has to be precisely equal to the width of the opening, or else the robot will break during the project demonstration, with catastrophic consequences for the grades of the two students.
Luckily, Liesbeth and Jan were able to sneak into the physics laboratory late one night to measure the lengths of their remaining Lego pieces very accurately. Now they just need to select two pieces that will fit the opening perfectly.
Input
For each test case, you get:
a line containing one positive integer: x, denoting the width of the opening in centimetres, with 1 ≤ x ≤ 20.
a line containing one non-negative integer: n, denoting the remaining number of Lego pieces Liesbeth and Jan have access to, with 0 ≤ n ≤ 1000000.
n lines containing positive integers l, denoting lengths of Lego pieces in nanometres. Liesbeth and Jan have told you that no piece of Lego is longer than 10 centimetres, or 100000000 nanometres.
Output
For each test case, a row containing the word 'danger' if no two pieces of Lego exist that precisely fit into the opening, or 'yes l_1 l_2', with l_1 ≤ l_2, should two such pieces of lengths l_1 and l_2 exist. In case multiple solutions exist, a solution maximising the size difference |l_1-l_2| must be printed.