K Co-prime Permutation
시간 제한1초메모리 제한512 MB
n과 k가 주어질 때 gcd(p_i, i) = 1인 위치가 정확히 k개인 1부터 n까지의 순열을 만들거나, 불가능하면 -1을 출력한다.
문제
Kotori is very good at math (really?) and she loves playing with permutations and primes.
One day, she thinks of a special kind of permutation named co-prime permutation. A permutation of is called a co-prime permutation of if there exists exactly integers such that and , where indicates the greatest common divisor of and .
Given and , please help Kotori construct a co-prime permutation of or just report that there is no such permutation.
Recall that a permutation of is a sequence of length containing all integers from to .
입력
There is only one test case in each test file.
The first and only line contains two integers and (, ).
출력
Output one line containing integers separated by one space, indicating the permutation satisfying the given constraints. If no such permutation exists output "-1" (without quotes) instead. If there are multiple valid answers you can print any of them.
Please, DO NOT output extra spaces at the end of each line, otherwise your answer may be considered incorrect!