LearnPy Hub
← Arena
AdvancedRating 1500

Equal Halves

Print YES if the numbers can be split into two groups with equal sums.

Input

n, then n positive integers (sum ≤ 2·10⁴).

Output

YES or NO.

Sample 1

Input
4
1 5 11 5
Output
YES

Sample 2

Input
4
1 2 3 5
Output
NO
solution.py
Output appears here
Equal Halves · Python Arena problem · LearnPy Hub