n=int(input()) i,t=0,0 while tn else "YES\n"+str(i))