题库练习 Relatively Prime Pairs
← 上一题 下一题 →

A12136 | Relatively Prime Pairs

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

The only line contains two integers $l$ and $r$ ( $1 \le l < r \le 10^{18}$ , $r - l + 1 \le 3 \cdot 10^5$ , $(r - l)$ is odd).

输入格式

If any solution exists, print "YES" in the first line. Each of the next $\frac{r - l + 1}{2}$ lines should contain some pair of integers. GCD of numbers in each pair should be equal to $1$ . All $(r - l + 1)$ numbers should be pairwise distinct and should have values from $l$ to $r$ inclusive.

If there are multiple solutions, print any of them.

If there exists no solution, print "NO".

输出格式

无

输入输出样例

输入 #1
1 8
输出 #1
YES
2 7
4 1
3 8
6 5
C++ 编辑器
输入
输出