Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/minmax-24-eng-katta-juft-son

Largest even number

Easy 1000 ms 128 MB 29%
Share

A positive integer $N$ and $N$ integers are given. Find the largest among the even numbers of the sequence. If the sequence has no even numbers, print NO.

Choosing the largest among the even numbers

Input

The first line contains a positive integer $N$. The next line contains $N$ integers $A_{i}$.

Output

One integer — the largest even number or NO.

Note

$1 \le N \le 1000$
$-10^{9} \le A_{i} \le 10^{9}$

Examples

Input #1
6
7 4 11 10 3 6
Output #1
10
Input #2
3
5 -3 9
Output #2
NO

Sign in to submit a solution

Signing up is free and takes a minute.