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.math.BigInteger;
import java.util.*;

import static java.lang.Math.*;

public class Main {
    FastScanner in;
    PrintWriter out;

    static final String FILE = "";


    private static final int MOD = 1_000_000_007;
    private static final int N = 2005;

    long gcd(long a, long b) {
        long c;
        while (a != 0) {
            c = a;
            a = b % a;
            b = c;
        }
        return b;
    }

    int c[][] = new int[N][N];

    void calc() {
        for (int i = 0; i < N; i++) {
            c[i][0] = 1;
            c[i][i] = 1;
            for (int j = 0; j < i; j++) {
                if (i >= 1 && j >= 1) {
                    c[i][j] = c[i - 1][j] + c[i - 1][j - 1];
                    c[i][j] %= MOD;
                }
            }
        }
    }

    public void solve() {
        //calc();

        int n = in.nextInt();
        long ms[] = new long[n];
        long sum[] = new long[n];
        long ans = 0;
        for (int i = 0; i < n; i++) {
            ms[i] = in.nextLong();
            ans += ms[i];
        }
        Arrays.sort(ms);
        for (int i = n - 1; i >= 0; i--) {
            if (i != n - 1)
                sum[i] = sum[i + 1];
            sum[i] += ms[i];
        }
        for (int i = 0; i < n - 1; i++) {
            long nm = (n - i - 1);
            ans += 2 * (sum[i + 1] - nm * ms[i]);
        }

        long mn = gcd(ans, n);
        out.print((ans / mn) + " " + (n / mn));
    }

    public void run() {
        if (FILE.equals("")) {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);
        } else {
            try {
                in = new FastScanner(new FileInputStream(FILE + ".in"));
                out = new PrintWriter(new FileOutputStream(FILE + ".out"));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }
        solve();
        out.close();
    }

    public static void main(String[] args) {
        (new Main()).run();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

        public String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
                return "";
            }
        }

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

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

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

    public ArrayList<Integer> readIntList(int n) {
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i < n; i++)
            list.add(in.nextInt());
        return list;
    }

    public ArrayList<String> readStringList(int n) {
        ArrayList<String> list = new ArrayList<>();
        for (int i = 0; i < n; i++)
            list.add(in.next());
        return list;
    }

    class Pair<A extends Comparable<A>, B extends Comparable<B>> implements Comparable<Pair<A, B>> {
        public A a;
        public B b;

        public Pair(A a, B b) {
            this.a = a;
            this.b = b;
        }

        @Override
        public int compareTo(Pair<A, B> o) {
            if (o == null || o.getClass() != getClass())
                return 1;
            int cmp = a.compareTo(o.a);
            if (cmp == 0)
                return b.compareTo(o.b);
            return cmp;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            Pair<?, ?> pair = (Pair<?, ?>) o;

            if (a != null ? !a.equals(pair.a) : pair.a != null) return false;
            return !(b != null ? !b.equals(pair.b) : pair.b != null);
        }
    }

    class PairInt extends Pair<Integer, Integer> {
        public PairInt(Integer u, Integer v) {
            super(u, v);
        }
    }

}
