B - Palillos

Languages: C, C++, Java, JavaScript, Tiger, Python, Haskell, Pascal, C#
Time & Memory limits: (details)

Usted cuenta con $N (1 \leq N \leq 15)$ palillos de diferentes longitudes y desea crear un cuadrado utilizando cada palillo exactamente una vez en alguno de los lados del cuadrado.

Determine si es posible crear el cuadrado o no.

Input

Línea 1: Un entero $N$ representando la cantidad de palillos.
Línea 2: $N$ enteros positivos representando las longitudes de los palillos.

Output

Línea 1: "SI" o "NO" dependiendo si es posible crear el cuadrado con los palillos o no respectivamente.

Sample test(s)

Input
5 1 1 2 2 2
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
SI
--- Showing first 30 lines (click "Copy" to get full content) ---
Input
5 3 3 3 3 4
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
NO
--- Showing first 30 lines (click "Copy" to get full content) ---