JATC's math teacher always gives the class some interesting math problems so that they don't get bored. Today the problem is as follows. Given an integer n, you can perform the following operations zero or more times:

  * mul x: multiplies n by x (where x is an arbitrary positive integer). 
  * sqrt: replaces n with √{n} (to apply this operation, √{n} must be an integer). 



You can perform these operations as many times as you like. What is the minimum value of n, that can be achieved and what is the minimum number of operations, to achieve that minimum value?

Apparently, no one in the class knows the answer to this problem, maybe you can help them?

Input

The only line of the input contains a single integer n (1 ≤ n ≤ 10^6) — the initial number.

Output

Print two integers: the minimum integer n that can be achieved using the described operations and the minimum number of operations required.

Examples

Input

20


Output

10 2

Input

5184


Output

6 4

Note

In the first example, you can apply the operation mul 5 to get 100 and then sqrt to get 10.

In the second example, you can first apply sqrt to get 72, then mul 18 to get 1296 and finally two more sqrt and you get 6.

Note, that even if the initial value of n is less or equal 10^6, it can still become greater than 10^6 after applying one or more operations.
import java.io.*;
import java.util.*;

import static sun.nio.ch.IOStatus.check;

public class Main {

    public static void main(String[] args) {

        try {
            InputStream inputStream = System.in;
            //InputStream inputStream = new FileInputStream("input.in");
            OutputStream outputStream = System.out;
            InputReader in = new InputReader(inputStream);
            PrintWriter out = new PrintWriter(outputStream);

            Solver solver = new Solver(in, out);
            solver.solve();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    static class Solver {

        InputReader in;
        PrintWriter out;

        public Solver(InputReader in, PrintWriter out) {
            this.in = in;
            this.out = out;
        }

        int ans = 1, res = 0;
        List<Integer> primes = new ArrayList<>();

        public void solve() {
            getPrimes();
            int n = in.nextInt();
            int N = n;
            Map<Integer, Integer> map = new HashMap<>();
            for (Integer p : primes) {
                if (N == 1) {
                    break;
                }
                int cnt = 0;
                while (N % p == 0) {
                    cnt++;
                    N /= p;
                }
                if (cnt > 0) {
                    map.put(p, cnt);
                }
            }

            for (int i = 0; i <= 31; i++) {
                int power = (1 << i);
                if (f(power, map)) {
                    if (!f2(power, map)) {
                        res++;
                    }
                    for (Integer p : map.keySet()) {
                        ans *= p;
                    }
                    res += i;
                    out.print(ans + " " + res);
                    break;
                }
            }
        }

        private boolean f2(int power, Map<Integer, Integer> map) {
            for (Integer p : map.keySet()) {
                if (power != map.get(p)) {
                    return false;
                }
            }
            return true;
        }

        private boolean f(int power, Map<Integer, Integer> map) {
            for (Integer p : map.keySet()) {
                if (power < map.get(p)) {
                    return false;
                }
            }
            return true;
        }

        private void getPrimes() {
            int n = 1000000;
            boolean[] prime = new boolean[n + 1];
            Arrays.fill(prime, true);
            prime[0] = prime[1] = false;
            for (int i = 2; i <= n; ++i) {
                if (prime[i]) {
                    if (i * 1L * i <= n) {
                        for (int j = i * i; j <= n; j += i)
                            prime[j] = false;
                    }
                }
            }
            for (int i = 1; i <= n; i++) {
                if (prime[i]) {
                    primes.add(i);
                }
            }
        }

        private int int2bool(int a) {
            if (a != 0) return 1;
            return 0;
        }

        private long binpow(long a, long n) {
            long res = 1;
            while (n > 0) {
                if (n % 2 == 1)
                    res *= a;
                a *= a;
                n >>= 1;
            }
            return res;
        }

        class IntIntPair implements Comparable<IntIntPair> {

            public Long first;
            public Integer second;

            public IntIntPair() {
                this.first = -1L;
                this.second = -1;
            }

            public IntIntPair(Long first, Integer second) {
                this.first = first;
                this.second = second;
            }

            @Override
            public boolean equals(Object o) {
                if (this == o) return true;
                if (o == null || getClass() != o.getClass()) return false;
                IntIntPair that = (IntIntPair) o;
                return Objects.equals(first, that.first) &&
                        Objects.equals(second, that.second);
            }

            @Override
            public int hashCode() {

                return Objects.hash(first, second);
            }

            @Override
            public int compareTo(IntIntPair intIntPair) {
                if (first.equals(intIntPair.first)) {
                    return second.compareTo(second);
                }
                return first.compareTo(intIntPair.first);
            }
        }
    }


    static class ArrayUtils {
        public static void fill(int[][] array, int value) {
            for (int[] row : array) {
                Arrays.fill(row, value);
            }
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextLine() {
            tokenizer = null;
            try {
                return reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

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

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

    }

}