Dynamic Array - 2#194

Dynamic Array - 2

1 second
128 megabytes
Very easy (≈850)

A list of integers is given. Output the count of negative elements in this list and themselves in reverse order of appearance in the input. Use the vector structure.

Input

The first line contains the integer (1 ≤ n ≤ 100). The second line contains integers not exceeding by modulo.

Output

Print the number of negative elements in the list on the first line. On the second line, print these negative elements in reverse order separated by spaces. If there are no negative elements in the list, output NO.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading