Small sequence and the first n elements
Description
Given two ordered list of length n (non-descending table) A and B, in taking an addition of any of the respective A and B, and a n2 can be obtained. These and find the smallest n
Input
Is input two lines, each row has n integers, separated with a space between each other.
Output
Output the contents of only one line, the line has n is an integer of from small to large, and the n representatives obtained, with a space between each other.
Sample Input
1 3 5 7
2 4 6 8
Sample Output
3 5 5 7
HINT
30% of the data, 1≤n≤1000; 100% of the data, 1≤n≤100000; all data, 2n number entered between -109 to 109;
Source