require 'pp'

n = gets.to_i
a_n = gets.split.map(&:to_i)
b_n = gets.split.map(&:to_i)

x = a_n.tally
y = b_n.tally
keys = y.keys
sum = {}
x.each do |k, v|
    t = v + (y[k] || 0) 
    if t > n
        puts 'No'
        exit 0
    end

    sum[k] = t
end
puts "Yes"

offset = x.values.max
ans = []
n.times do |i|
    ans << b_n[(i+offset)%n]
end

puts ans.join(" ")
