Iahub is a big fan of tourists. He wants to become a tourist himself, so he planned a trip. There are n destinations on a straight road that Iahub wants to visit. Iahub starts the excursion from kilometer 0. The n destinations are described by a non-negative integers sequence a1, a2, ..., an. The number ak represents that the kth destination is at distance ak kilometers from the starting point. No two destinations are located in the same place. 

Iahub wants to visit each destination only once. Note that, crossing through a destination is not considered visiting, unless Iahub explicitly wants to visit it at that point. Also, after Iahub visits his last destination, he doesn't come back to kilometer 0, as he stops his trip at the last destination. 

The distance between destination located at kilometer x and next destination, located at kilometer y, is |x - y| kilometers. We call a "route" an order of visiting the destinations. Iahub can visit destinations in any order he wants, as long as he visits all n destinations and he doesn't visit a destination more than once. 

Iahub starts writing out on a paper all possible routes and for each of them, he notes the total distance he would walk. He's interested in the average number of kilometers he would walk by choosing a route. As he got bored of writing out all the routes, he asks you to help him.

Input

The first line contains integer n (2 ≤ n ≤ 105). Next line contains n distinct integers a1, a2, ..., an (1 ≤ ai ≤ 107).

Output

Output two integers — the numerator and denominator of a fraction which is equal to the wanted average number. The fraction must be irreducible.

Examples

Input

3
2 3 5


Output

22 3

Note

Consider 6 possible routes:

  * [2, 3, 5]: total distance traveled: |2 – 0| + |3 – 2| + |5 – 3| = 5; 
  * [2, 5, 3]: |2 – 0| + |5 – 2| + |3 – 5| = 7; 
  * [3, 2, 5]: |3 – 0| + |2 – 3| + |5 – 2| = 7; 
  * [3, 5, 2]: |3 – 0| + |5 – 3| + |2 – 5| = 8; 
  * [5, 2, 3]: |5 – 0| + |2 – 5| + |3 – 2| = 9; 
  * [5, 3, 2]: |5 – 0| + |3 – 5| + |2 – 3| = 8. 



The average travel distance is <image> = <image> = <image>.
import java.io.*;
import java.text.DecimalFormat;
import java.util.*;

public class b {
    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);


        /*
        Note to self: any problem that talks about factorials with bounds this big can probably
        avoid any use of factorials at all.

        Every permutation has to start with one element of a, and the sum for that step is just
        a[i] - 0. For each starting position of a permutation that is a[i], there are (n-1)! permutations
        to go with it.

        Ex: 2 3 5
        If two is the starting element, there are two permutations (2, 3, 5 and 2, 5, 3). So for each element
        a[i], the amount that it contributes to the total sum is a[i] * (n-1)!

        Call this value sum1.

        For every other value that isn't the starting value, it will pair with every element behind it in a total
        of (n-1) permutations and have (n-2)! permutations that are irrelevant.

        Ex: a = {1, 2, 3, 4}

        When looking at the pair 3,4 they will show up next to each other in (n-1) positions when looking at all
        permutations. For each of those positions, there are (n-2)! ways I can reorder the surrounding numbers
        of the pair 3,4. So the number of times I will have to add the difference between 3 and 4 over all permutations
        is (n-1) for the number of positions they appear in * (n-2)! for the number of permutations where 3 and 4
        are adjacent to each other.

        So for each pair i,j they contribute abs(a[j]-a[i]) * (n-1) * (n-2)! to the overall sum.
        Notice that (n-1) * (n-2)! is just equal to (n-1)! so the formula becomes

        abs(a[j]-a[i]) * (n-1)!

        Call this value sum2

        The total number of routes that can be taken is n!

        So the answer is:

        (sum1 + sum2) / n! or

        a[i] * (n-1)! + ( abs(a[i]-a[j]) * (n-1)!) / n!

        Actual permutations are too big for this problem but we can do some cancelling out to get rid of them

        Factor out the (n-1)! of the numerator so that it becomes:

        (n-1)! * (sumOf(a) + sumOf(abs(a[i]-a[j])) / n!

        Divide n! by (n-1)! to reduce the denominator to n:

        sumOf(a) + sumOf(abs(a[i]-a[j])) for all i and j / n

        This is the answer but calculating the sum of differences for all pairs is too slow. What can be done
        is to look at the array in sorted order and see this:

        a = {3, 5, 7, 9, 11}

        Let's calculate the difference between 7 and all numbers before it. It is essentially

        (7-3) + (7-5) Replace the two 7s with 2 * 7 and sum the numbers that are being subtracted so it becomes

        2*7 - 8 = 6 = (7-3) + (7-5)

        Notice that 8 is the sum of all the elements in the array so far and the factor that we multiply the current
        array element by is it's position (1-based) -1.

        At the end, we'll have only counted distinct pairs but order matters for permutations so multiply that result
        by two so that you get the sum of differences for all pairs.

        Now we can calculate the answer and reduce it's fractions using gcd.

        Definitely a pretty hard combinatorics problem.
         */

        int n = fs.nextInt();
        Integer[] a = fs.nextIntegerArray(n);
        long sum1 = 0;
        for(Integer i : a) sum1 += i;
        long sum2 = 0;
        Arrays.sort(a);
        long runSum = 0;
        for(int i = 0; i < n; i++) {
            sum2 += (long)i * a[i] - runSum;
            runSum += a[i];
        }
        sum2 *= 2;


        long numerator = sum1 + sum2, denominator = n;

        long gcd = gcd(numerator, denominator);

        System.out.printf("%d %d\n", numerator/gcd, denominator/gcd);

    }

    public static long gcd(long a, long b) {
        while (b > 0) {
            long temp = b;
            b = a%b;
            a = temp;
        }
        return a;
    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            try	{
                br = new BufferedReader(new InputStreamReader(System.in));
//                br = new BufferedReader(new FileReader("testdata.out"));
                st = new StringTokenizer("");
            } catch (Exception e){e.printStackTrace();}
        }

        public String next() {
            if (st.hasMoreTokens())	return st.nextToken();
            try {st = new StringTokenizer(br.readLine());}
            catch (Exception e) {e.printStackTrace();}
            return st.nextToken();
        }

        public int nextInt() {return Integer.parseInt(next());}

        public long nextLong() {return Long.parseLong(next());}

        public double nextDouble() {return Double.parseDouble(next());}

        public String nextLine() {
            String line = "";
            try {line = br.readLine();}
            catch (Exception e) {e.printStackTrace();}
            return line;
        }

        public Integer[] nextIntegerArray(int n) {
            Integer[] a = new Integer[n];
            for(int i = 0; i < n; i++) a[i] = nextInt();
            return a;
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for(int i = 0; i < n; i++) a[i] = nextInt();
            return a;
        }

        public char[] nextCharArray() {
            return nextLine().toCharArray();
        }
    }

}
