#C12703. Divisible Numbers Filter

    ID: 42160 Type: Default 1000ms 256MiB

Divisible Numbers Filter

Divisible Numbers Filter

You are given an integer n and a list of integers. Your task is to print, in their original order, all the numbers from the list that are divisible by n.

If n is zero, you must output ZeroDivisionError (without quotes). Otherwise, if no number in the list is divisible by n, print an empty line.

Note: The input is given from the standard input (stdin) and the output must be written to the standard output (stdout).

inputFormat

The first line contains an integer n. The second line contains a space‐separated list of integers.

Constraint: It is possible that n is 0, in which case your program should output ZeroDivisionError.

outputFormat

If n is not 0, print all the numbers from the list that are divisible by n, preserving their original order, with a single space separating them. If no number is divisible, print an empty line. If n is 0, print ZeroDivisionError.

## sample
3
3 1 4 9 6 10
3 9 6

</p>