Given an integer array. You have to check whether it is possible to divide the array in two parts such that the sum of elements of one part is equal to the sum of the element of the other part.If it is possible print "YES" otherwise "NO".
Sample Input
4 3 5 5 3
Sample Output
YES
Explanation
Array can be divided in two parts {4,3,3} and {5,5}
Sample Input
1 3
Sample Output
NO
Sample Input
5 5
Sample Output
YES
-sum(input)/2
to the input array) and a trivial change to the output. \$\endgroup\$