import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Ord
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Unboxed.Mutable as VUM

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    n <- getInt
    as <- getIntList
    bs <- getIntList
    let v = VU.create $ do
            vec <- VUM.replicate (n+1) (0 :: Int)
            forM_ as $ \i -> do
                VUM.modify vec succ i
            forM_ bs $ \i -> do
                VUM.modify vec succ i
            return vec
    let m = VU.maximum v
    let p = m > n
    let (bx,by) = splitAt (n `div` 3) bs
    let rs = solve (bx,[]) as by
    if p then
        putStrLn "No"
    else do
        putStrLn "Yes"
        putStrLn $ unwords $ map show rs

solve (_,ans) [] [] = reverse ans
solve (l,ans) as [] = solve ([],ans) as l
solve (l,ans) (a:as) (b:bs)
    | a /= b = solve (l,b:ans) as bs
    | a == b = solve (b:l,ans) (a:as) bs