Get equal
On the table there are cards. On each card it is written some number. Moreover, there is a quite large stack of empty cards. For one turn, it is allowed take away from the table two cards with equal numbers, then take two empty cards from stack, write a number on each of them and put them on the table.
It is required to determine how to make in minimal number of turns the equal numbers were written on all cards on the table.
Input
The first line contains the number of cards N on the table (1 ≤ N ≤ 30000). The second line consists of N numbers, written of cards. All numbers is positive integer and does not exceed 10^9.
Output
On the first line output the minimal number of operations L, which necessary to get all equal cards on the table. On each of following L lines output four numbers describing corresponding turn: first and second ones are numbers on taken off cards, third and fourth ones are numbers written on new cards. If it is impossible to get all equal cards, output the only number -1.