Last Vector Standing

That's the last one, I thought as I finished the last of the emails. SEND. Blackout. I felt a shrill run down my spine. What was going on? Almost instantly the control panel started lighting up again. In a desperate attempt to figure out what had happened I tried to access one of the surveillance cameras on the bottom floor. Click!

You think you can defeat me? the deep, muffled voice pounded on my eardrums. It was him...one of Russia's most feared generals... Igor Plushenkovici. You are nothing... I have defeated your entire navy and air force... what else would you like me to do? My heart sank. You know... you are very persistent nation... but you see... persistence is this case is, well, stupidity he chuckled. Most predators like to play with their meal before they devour it, so I tell you what... we play little game I like to call: decipher the code, or presidential estate goes BOOM!. My heart started racing... what kind of sick, twisted person was this? I remembered the president telling one of his officials how vile Igor's habits were. So... the voice shrieked We play?

Two buttons appeared on the center screen of the control panel.
YES or NO?

My head was spinning... had I made the right choice? I was just another one of Igor's toys... another victim that caved into his cruelty...
Let the games begin!
A white envelope icon appeared on the screen. Click. Flash. I started reading the message, it was a code. There are two strings, denoted by A and B, whose lengths' are N and M. For each element from the A string you can subtract at most one element from the B string. Your task is to find the maximum number of unique numbers. Remember that you must only count each number once, no matter how many times it appears in the final list. Your time starts... NOW!

5:00
4:59
4:58
...

Input

N and M are on the first line. The elements from string A are on the second line and the elements from string B are on the third line.

Output

On the first line of the input, print the final values of the elements of string A, and on the next line, the final numbers, in their original order.

Constraints

1 ≤ N ≤ 1000
0 ≤ M ≤ 1000
The elements of strings A and B are signed 30 bits integer numbers.
If there is more than one solution, you can print any of them.

Sample

InputOutput
4 0
1 1 1 1
1
1 1 1 1
Questions?

Sponsors Gold