Code 8
Code 8
return to her hometown. In order to make her trip more entertaining, one of Nastya's friend presented
her an integer array aa.
Several hours after starting her journey home Nastya remembered about the present. To entertain
herself she decided to check, are there four different indices x,y,z,wx,y,z,w such
that ax+ay=az+awax+ay=az+aw.
Her train has already arrived the destination, but she still hasn't found the answer. Can you help her
unravel the mystery?
Input
The first line contains the single integer nn (4≤n≤2000004≤n≤200000) — the size of the array.
The second line contains nn integers a1,a2,…,ana1,a2,…,an (1≤ai≤2.5⋅1061≤ai≤2.5⋅106).
Output
Print "YES" if there are such four indices, and "NO" otherwise.
If such indices exist, print these indices xx, yy, zz and ww (1≤x,y,z,w≤n1≤x,y,z,w≤n).