You are given N positive integers, where N is even. You can arrange them in any order, to maximise the value of the following expression
pow(A1,A2)+pow(A3,A4)+⋯+pow(AN−1,AN)
where pow(a,b) means ab % b.
Find the maximum value possible.
INPUT:
OUTPUT
CONSTRAINTS
The maximum value is achived as pow(1,2)+pow(2,5)=1+2=3