Given two arrays A & B of size N each.

Find the maximum n elements from the sum combinations (Ai + Bj) formed from elements in array A and B.

For example if A = [1,2], B = [3,4], then possible pair sums can be 1+3 = 4 , 1+4=5 , 2+3=5 , 2+4=6

and maximum 2 elements are 6, 5

Example:

N = 4

a[]={1,4,2,3}

b[]={2,5,1,6}

Maximum 4 elements of combinations sum are

10 (4+6),

9 (3+9),

9 (4+5),

8 (2+6)