Problem: You are given a positive integer n.

Find a sequence of fractions (a_i)/(b_i), i = 1 … k (where a_i and b_i are positive integers) for some k such that:

$$$ \begin{cases} $b_i$ divides $n$, $1 < b_i < n$ for $i = 1 … k$ \\\ $1 ≤ a_i < b_i$ for $i = 1 … k$ \\\ \text{$∑_{i=1}^k (a_i)/(b_i) = 1 - 1/n$} \end{cases} $$$

Input

The input consists of a single integer n (2 ≤ n ≤ 10^9).

Output

In the first line print "YES" if there exists such a sequence of fractions or "NO" otherwise.

If there exists such a sequence, next lines should contain a description of the sequence in the following format.

The second line should contain integer k (1 ≤ k ≤ 100 000) — the number of elements in the sequence. It is guaranteed that if such a sequence exists, then there exists a sequence of length at most 100 000.

Next k lines should contain fractions of the sequence with two integers a_i and b_i on each line.

Examples

Input


2


Output


NO


Input


6


Output


YES
2
1 2
1 3

Note

In the second example there is a sequence 1/2, 1/3 such that 1/2 + 1/3 = 1 - 1/6.

Solution (in JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        F solver = new F();
        solver.solve(1, in, out);
        out.close();
    }

    static class F {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int n = in.ni();
            int[] divs = new int[5000];
            int di = 0;
            for (int div = 2; div * div <= n; div++) {
                if (n % div == 0) {
                    divs[di++] = div;
                }
            }
            for (int i = di - 1; i >= 0; i--) {
                int div = divs[i];
                if (div * div != n) {
                    divs[di++] = n / div;
                }
            }
            int c = n - 1;
            boolean found = false;
            for (int i = 0; i < di && !found; i++) {
                for (int j = i + 1; j < di && !found; j++) {
                    if (IntegerUtils.gcd(divs[i], divs[j]) == 1) {
                        int a = divs[i], b = divs[j];
                        long[] x = new long[2];
                        IntegerUtils.gcdExt(a, b, x);
                        x[0] *= c;
                        x[1] *= c;
                        if (x[0] > 0) {
                            x[1] += x[0] / b * a;
                            x[0] -= x[0] / b * b;
                        } else {
                            x[0] += x[1] / a * b;
                            x[1] -= x[1] / a * a;
                        }
                        if (x[0] >= 0 && x[1] >= 0) {

                            int b1 = n / a;
                            int b2 = n / b;
                            long k = (x[0] + b1 - 2) / (b1 - 1) + (x[1] + b2 - 2) / (b2 - 1);
                            if (k > 100_000) {
                                found = false;
                                continue;
                            }
                            out.println("YES");
                            out.println(k);
                            for (int l = 0; l < x[0] / (b1 - 1); l++) {
                                out.printf("%d %d%n", b1 - 1, b1);
                            }
                            if (x[0] % (b1 - 1) > 0)
                                out.printf("%d %d%n", x[0] % (b1 - 1), b1);
                            for (int l = 0; l < x[1] / (b2 - 1); l++) {
                                out.printf("%d %d%n", b2 - 1, b2);
                            }
                            if (x[1] % (b2 - 1) > 0)
                                out.printf("%d %d%n", x[1] % (b2 - 1), b2);
                            //check
                            if (a * x[0] + b * x[1] != c)
                                throw new RuntimeException("assert");
                            return;

                        }
                    }
                }
            }
            out.println("NO");

        }

    }

    static class FastScanner {
        private BufferedReader in;
        private StringTokenizer st;

        public FastScanner(InputStream stream) {
            in = new BufferedReader(new InputStreamReader(stream));
        }

        public String ns() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    String rl = in.readLine();
                    if (rl == null) {
                        return null;
                    }
                    st = new StringTokenizer(rl);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        public int ni() {
            return Integer.parseInt(ns());
        }

    }

    static class IntegerUtils {
        public static long gcd(long a, long b) {
            while (b != 0) {
                long t = b;
                b = a % b;
                a = t;
            }
            return a;
        }

        public static long gcdExt(long a, long b, long[] x) {
            if (a == 0) {
                x[0] = 0;
                x[1] = 1;
                return b;
            }
            long[] x1 = new long[2];
            long d = gcdExt(b % a, a, x1);
            x[0] = x1[1] - (b / a) * x1[0];
            x[1] = x1[0];
            return d;
        }

    }
}