1. 程式人生 > >Codeforces Round #486 (Div. 3) C. Equal Sums

Codeforces Round #486 (Div. 3) C. Equal Sums

Output

If it is impossible to choose two sequences such that they satisfy given conditions, print "NO" (without quotes). Otherwise in the first line print "YES" (without quotes), in the second line — two integers iixx (1ik,1xni1≤i≤k,1≤x≤ni), in the third line — two integers jjyy (1jk,1ynj1≤j≤k,1≤y≤nj

). It means that the sum of the elements of the ii-th sequence without the element with index xx equals to the sum of the elements of the jj-th sequence without the element with index yy.

Two chosen sequences must be distinct, i.e. iji≠j. You can print them in any order.

If there are multiple possible answers, print any of them.