s=-1 puts$<.all?{|i|s+=1;g,d=i.split;g.to_f-3e4*d.to_f<5e5}?:NO:[:YES,[s]*6]