Sum and Average of Even Elements
Compute the sum and arithmetic mean of the even elements in an array.
Input
The first line contains \(n\). The second line contains \(n\) integers.
The input satisfies:
- \(1 <= n <= 10^6\)
- \(The array contains at least one even element.\)
Output
Print the even-element sum. On the next line print their average with two digits after the decimal point.
Example
Input
5
1 5 4 3 12
Output
16
8.00
Comments