Algorithm


A. Counterexample
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

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

Your friend often comes up with different statements. He has recently supposed that if the pair (a, b) is coprime and the pair (b, c) is coprime, then the pair (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), for which the statement is false, and the numbers meet the condition l ≤ a < b < c ≤ r.

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

Input

The single line contains two positive space-separated integers lr (1 ≤ l ≤ r ≤ 1018r - l ≤ 50).

Output

Print three positive space-separated integers abc — three distinct numbers (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.

Examples
input
Copy
2 4
output
Copy
2 3 4
input
Copy
10 11
output
Copy
-1
input
Copy
900000000000000009 900000000000000029
output
Copy
900000000000000009 900000000000000010 900000000000000021
Note

In the first sample pair (2, 4) is not coprime and pairs (2, 3) and (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 900000000000000009 and 900000000000000021 are divisible by three.



 

Code Examples

#1 Code Example with C++ Programming

Code - C++ Programming

#include <bits/stdc++.h>

using namespace std;

long long l, r;

int main() {
  scanf("%lld %lld", &l, &r);
  for(long long i = l; i <= r; ++i)
    for(long long j = i + 1; j <= r; ++j)
      for(long long k = j + 1; k <= r; ++k)
        if(__gcd(i, j) == 1 && __gcd(j, k) == 1 && __gcd(i, k) != 1) {
          printf("%lld %lld %lld\n", i, j, k);
          return 0;
        }
  puts("-1");
  
  return 0;
}
Copy The Code & Try With Live Editor

Input

x
+
cmd
2 4

Output

x
+
cmd
2 3 4
Advertisements

Demonstration


Codeforces Solution-Counterexample-Solution in C, C++, Java, Python

Previous
Codeforces solution 1080-B-B. Margarite and the best present codeforces solution
Next
CodeChef solution DETSCORE - Determine the Score CodeChef solution C,C+