#C12266. Even Squares

    ID: 41674 Type: Default 1000ms 256MiB

Even Squares

Even Squares

You are given a list of integers as input on a single line (space-separated) from standard input. Your task is to compute the square of each integer and then output the square only if it is an even number. The output should preserve the order of the input numbers. If none of the squared numbers is even, output an empty line.

For example:

  • Input: 1 2 3 4Output: 4 16
  • Input: 1 3 5 7Output: (empty)

Handle negative numbers and zero appropriately.

inputFormat

The input will be a single line containing space-separated integers. For example: 1 2 3 4.

outputFormat

Output a single line with the even squares of the given integers, in the same order as they appear in the input, separated by a space. If there are no even squares, output an empty line.

## sample
1 2 3 4
4 16