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.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;

import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.System.exit;
import static java.util.Arrays.sort;

public class Solve implements Runnable {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    void init() throws FileNotFoundException {
        try {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } catch (Exception e) {
            String filename = "";
            if (!filename.isEmpty()) {
                in = new BufferedReader(new FileReader(filename + ".in"));
                out = new PrintWriter(filename + ".out");
            } else {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            }
        }
    }

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    int[] readIntArray(int size) throws IOException {
        int[] res = new int[size];
        for (int i = 0; i < size; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long[] readLongArray(int size) throws IOException {
        long[] res = new long[size];
        for (int i = 0; i < size; i++) {
            res[i] = readInt();
        }
        return res;
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    <T> List<T>[] createGraphList(int size) {
        List<T>[] list = new List[size];
        for (int i = 0; i < size; i++) {
            list[i] = new ArrayList<>();
        }
        return list;
    }

    public static void main(String[] args) {
        new Solve().run();
//        new Thread(null, new Template(), "", 1l * 200 * 1024 * 1024).start();
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    long memoryTotal, memoryFree;

    void memory() {
        memoryFree = Runtime.getRuntime().freeMemory();
        System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
                + " KB");
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();
            memoryTotal = Runtime.getRuntime().freeMemory();
            init();
            solve();
            out.close();
            if (System.getProperty("ONLINE_JUDGE") == null) {
                time();
                memory();
            }
        } catch (Exception e) {
            e.printStackTrace();
            exit(-1);
        }
    }

    long gcd(long a, long b) {
        if (b == 0) {
            return a;
        } else return gcd(b, a % b);
    }

    Pair solve(long a, long b, long c) {
        if (b == 0) return new Pair(c / a, 0);
        else {
            Pair s = solve(b, a % b, c);
            return new Pair(s.b, s.a - a / b * s.b);
        }
    }

    private void solve() throws IOException {
        int n = readInt();
        int c = n;
        int p1 = -1;
        int p2 = -1;
        for (int i = 2; (long) i * i <= n; i++) {
            if (n % i == 0) {
                p1 = i;
                while (n % i == 0) {
                    n /= i;
                }
                break;
            }
        }
        if (p1 == -1 || n == 1) {
            out.print("NO");
            return;
        }

        for (int i = 2; (long) i * i <= n; i++) {
            if (n % i == 0) {
                p2 = i;
                break;
            }
        }

        if (p2 == -1) {
            p2 = n;
        }
        n = c;
        Pair p = solve(p1, p2, n - 1);
        long ans1 = p.a;
        long ans2 = p.b;
        while (ans1 < 0 || ans2 < 0) {
            if (ans1 < 0) {
                ans1 += p2;
                ans2 -= p1;
            } else {
                ans1 -= p2;
                ans2 += p1;
            }
        }

        out.println("YES");
        out.println(2);
        long f = ans1 * p1;
        long g1 = gcd(n, f);
        long s = ans2 * p2;
        long g2 = gcd(n, s);
        out.println(f / g1 + " " + n / g1);
        out.println(s / g2 + " " + n / g2);
    }

    class Pair {
        long a;
        long b;

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