gets a, *b, c = gets.split.map(&:to_i) puts('No') + exit if a > c puts 'Yes', [b.select { a < _1 } + b.reverse.select { _1 < a } + [a]].join(' ')