say ($_=(-1+sqrt 1+8*get)/2)~~/\./??'NO'!!"YES $_"