#K61957. Spot The Squares

    ID: 31424 Type: Default 1000ms 256MiB

Spot The Squares

Spot The Squares

You are given a non-negative integer n. Your task is to find and print all perfect square numbers that do not exceed n. A perfect square is a number of the form \( i^2 \) where \( i \ge 1 \) is an integer.

For example, if \( n = 20 \), the perfect squares are \( 1, 4, 9, \) and \( 16 \).

inputFormat

The input consists of a single integer n (\(0 \le n \le 10^9\)), given on a single line.

outputFormat

Output all perfect squares less than or equal to n in increasing order, separated by a single space. If there are no perfect squares (for example, when n = 0), output an empty line.

## sample
20
1 4 9 16