import Data.Maybe

main = do
  n<-readLn
  xs<-map read.words<$>getLine
  putStr$solve n xs

solve :: Int->[Int]->String
solve n xs
  | -1`elem`ans = "No"
  | otherwise = "Yes \n"++unwords(map show ans)
  where
  ans = go xis ls 1
  go [] _ _ = [-1]
  go ((x,i):_) [] n
    | x == n = i : reverse ( go' (reverse xis) rs (n*n) )
    | otherwise = reverse $ go' (reverse xis) rs (n*n)
  go ((x,i):xis) (l:ls) n
    | x == n = i : go xis (l:ls) (n+1)
    | otherwise = l : go ((x,i):xis) ls (n+1)
  go' [] (_:_) _ = [-1]
  go' _ [] _ = []
  go' ((x,i):xis) (r:rs) n
    | x == n = i : go' xis (r:rs) (n-1)
    | otherwise = r : go' ((x,i):xis) rs (n-1)
  xis = zip xs [1..]
  ls = concatMap (\i->replicate (i-1) i) [1..n]
  rs = concatMap (\i->replicate (n-i) i) [n,n-1..1]
