#1373
Unrated
Fractions
스페셜 저지
시간 제한
2s
메모리 제한
512MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

You are given a positive integer nn.

Find a sequence of fractions aibi\frac{a_i}{b_i}, i=1ki = 1 \ldots k (where aia_i and bib_i are positive integers) for some kk such that:

{bi divides n1<bi<n for i=1k1ai<bi for i=1ki=1kaibi=11n\begin{cases} \text{$b_i$ divides $n$, $1 < b_i < n$ for $i = 1 \ldots k$} \\ \text{$1 \le a_i < b_i$ for $i = 1 \ldots k$} \\ \text{$\sum\limits_{i=1}^k \frac{a_i}{b_i} = 1 - \frac{1}{n}$} \end{cases}

입력

The input consists of a single integer nn (2n1092 \le n \le 10^9).

출력

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 kk (1k1000001 \le k \le 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 100000100\,000.

Next kk lines should contain fractions of the sequence with two integers aia_i and bib_i on each line.

예제 입력 1

2

예제 출력 1

NO

예제 입력 2

6

예제 출력 2

YES
2
1 2
1 3

노트

In the second example there is a sequence 12,13\frac{1}{2}, \frac{1}{3} such that 12+13=116\frac{1}{2} + \frac{1}{3} = 1 - \frac{1}{6}.

코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.