CF1051B.Relatively Prime Pairs

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

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

输入格式

If any solution exists, print "YES" in the first line. Each of the next rl+12\frac{r - l + 1}{2} lines should contain some pair of integers. GCD of numbers in each pair should be equal to 11 . All (rl+1)(r - l + 1) numbers should be pairwise distinct and should have values from ll to rr 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
    
首页