A12136. Relatively Prime Pairs
编程题
普及/提高-
知识点
题目描述
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".
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