Given an undirected weighted graph where there is an edge between every pair of distinct vertices of nonnegative integer weight, let be the sum of the weights of the edges incident on vertex .
Given a sequence of integers through , determine if it is possible to construct a graph of vertices such that for every vertex in the graph.
There is no opportunity for partial credit on this problem.
The first line contains a single integer, .
Each of the next lines contains a single integer, through in order.
YES if it is possible to construct such a graph. Output
Sample Input 1
3 1 1 2
Sample Output 1
Sample Input 2
3 1 1 3
Sample Output 2