n=gets.to_i a=$<.map{|e|eval e.sub' ','-30000*'} m=a.max puts m<5e6?:NO:[:YES,[a.index(m)]*n]