Quadratic Permutation High
Consider a permutation of numbers from a to b. We call it a quadratic permutation if, for each element, the sum of the element and the element that replaces it in the permutation is a perfect square. More precisely, a quadratic permutation is defined as a bijection p of the set of integers from a to b onto itself, such that for any integer i, the condition i + p(i) = j^2 holds for some integer j. Given a and b, your task is to find a quadratic permutation.
Constraints
- a, b are integers. - 0 ≤ a ≤ 100 - 0 ≤ b ≤ 100000 - a ≤ b
Input
The input consists of a single line containing the integers a and b.
Output
Output b-a+1 numbers that represent the values of p(i) for all i from a to b, where p is a quadratic permutation. If no such permutation exists for the given a and b, output a single number -1.