Given an undirected weighted graph where there is an edge between every pair of distinct vertices of nonnegative integer weight, let ~a_i~ be the sum of the weights of the edges incident on vertex ~i~.
Given a sequence of integers ~b_1~ through ~b_N~, determine if it is possible to construct a graph of ~n~ vertices such that ~a_i = b_i~ for every vertex in the graph.
~1 \le N \le 50~
~1 \le b_i \le 10^9~
There is no opportunity for partial credit on this problem.
The first line contains a single integer, ~N~.
Each of the next ~N~ lines contains a single integer, ~b_1~ through ~b_N~ in order.
YES if it is possible to construct such a graph. Output
3 1 1 2
3 1 1 3