#P51. [KBC004C] Equation

[KBC004C] Equation

Source

This problem is adapted from Long Long OJ. All rights reserved.

Attention

The time limit for this problem is 0.1 seconds, and the memory limit is 8 MB.

Problem Description

Find all pairs (a,b)(a ,b) (where a>0,b>0a > 0, b > 0) such that ab+a+b=Nab + a + b = N, and output them in ascending order of aa (if aa is the same, output in ascending order of bb).

If no such pairs (a,b)(a, b) exist, output No.

Input Format

A single line containing a positive integer N (1N1012)N\ (1 \le N \le 10^{12}).

Output Format

Output all pairs (a,b)(a, b) satisfying ab+a+b=Nab+a+b=N in ascending order of aa (if aa is the same, output in ascending order of bb).

If no such pairs (a,b)(a, b) exist, output No.

Samples

11
1 5
2 3
3 2
5 1
6
No