Quadratic Permutation High#4573

Quadratic Permutation High

1 secondo
256 megabyte
Facile

Consider a permutation of numbers from to . 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 of the set of integers \{ a, a+1, \ldots, b \} onto itself, such that for any integer , the condition i + p(i) = j^2 holds for some integer . Given and , your task is to find a quadratic permutation.

Constraints

Input

The input consists of a single line containing the integers and .

Output

Output b - a + 1 numbers that represent the values of for all from to , where is a quadratic permutation. If no such permutation exists for the given and , output a single number .

Esempi

Esempio 1

Loading
Loading