#K85412. Filter Even Numbers from Array

    ID: 36636 Type: Default 1000ms 256MiB

Filter Even Numbers from Array

Filter Even Numbers from Array

Given an array of integers, your task is to output a new list that contains only the even numbers from the provided array. An integer is even if it satisfies the condition \(n\mod2 = 0\). If there are no even numbers, simply output an empty line.

The order of numbers in the output must follow the order in which they appear in the input.

inputFormat

The input is given via standard input (stdin) as a single line of space-separated integers.

outputFormat

Output all even integers separated by a single space on one line. If there are no even numbers, output an empty line.

## sample
1 2 3 4 5 6
2 4 6