CF483A.Counterexample

普及/提高-

通过率:0%

AC君温馨提醒

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

题目描述

Your friend has recently learned about coprime numbers. A pair of numbers a,b{a,b} is called coprime if the maximum number that divides both aa and bb is equal to one.

Your friend often comes up with different statements. He has recently supposed that if the pair (a,b)(a,b) is coprime and the pair (b,c)(b,c) is coprime, then the pair (a,c)(a,c) is coprime.

You want to find a counterexample for your friend's statement. Therefore, your task is to find three distinct numbers (a,b,c)(a,b,c) , for which the statement is false, and the numbers meet the condition l<=a<b<c<=rl<=a<b<c<=r .

More specifically, you need to find three numbers (a,b,c)(a,b,c) , such that l<=a<b<c<=rl<=a<b<c<=r , pairs (a,b)(a,b) and (b,c)(b,c) are coprime, and pair (a,c)(a,c) is not coprime.

输入格式

The single line contains two positive space-separated integers ll , rr ( 1<=l<=r<=10181<=l<=r<=10^{18} ; rl<=50r-l<=50 ).

输出格式

Print three positive space-separated integers aa , bb , cc — three distinct numbers (a,b,c)(a,b,c) that form the counterexample. If there are several solutions, you are allowed to print any of them. The numbers must be printed in ascending order.

If the counterexample does not exist, print the single number -1.

输入输出样例

  • 输入#1

    2 4
    

    输出#1

    2 3 4
    
  • 输入#2

    10 11
    

    输出#2

    -1
    
  • 输入#3

    900000000000000009 900000000000000029
    

    输出#3

    900000000000000009 900000000000000010 900000000000000021
    

说明/提示

In the first sample pair (2,4)(2,4) is not coprime and pairs (2,3)(2,3) and (3,4)(3,4) are.

In the second sample you cannot form a group of three distinct integers, so the answer is -1.

In the third sample it is easy to see that numbers 900000000000000009900000000000000009 and 900000000000000021900000000000000021 are divisible by three.

首页