Skip to main content
LIVE CONTEST: Round #7 · Begin Marathon is live now! …

~/algor $ cat problems/for/perfect-squares-in-a-range

Perfect squares in a range

Author Iqbolshoh Ilhomjonov 3 @iqbolshoh 650 problems
Easy 1000 ms 64 MB 21%
Share

Two positive integers and are given. Print in increasing order all perfect squares ( — squares of positive integers) from to (both inclusive). If there are none, print .

The segment from a to b on the number line; the perfect squares in it are highlighted

Input

One line with two positive integers: and .

Output

The perfect squares separated by spaces, or .

Note

Examples

Input #1
10 50
Output #1
16 25 36 49
Input #2
17 24
Output #2
-1

Sign in to submit a solution

Signing up is free and takes a minute.