#C12278. Numbers Divisible by 3 and 5

    ID: 41687 Type: Default 1000ms 256MiB

Numbers Divisible by 3 and 5

Numbers Divisible by 3 and 5

This problem requires you to filter a list of integers and output only those that are divisible by both 3 and 5. In other words, for a number \( n \), it must satisfy the conditions

\( n \mod 3 = 0 \) and \( n \mod 5 = 0 \), which is equivalent to \( n \mod 15 = 0 \).

You will be given a set of integers and you need to print the numbers fulfilling these criteria in the same order as in the input.

inputFormat

The first line of input contains an integer \( n \) representing the number of integers in the list. The second line contains \( n \) space-separated integers.

outputFormat

Output a single line containing the filtered integers (those divisible by both 3 and 5) separated by a single space. If no numbers satisfy the condition, output an empty line.

## sample
6
10 15 30 50 75 80
15 30 75

</p>