program k_th_k
  implicit none
  integer :: n, x(500) = 0, a(250000) = 0, i, j, m, c, k
  integer :: l(0:250000) = 0, r(250001) = 0, idx(250000) = 0
  read(*,*) n
  read(*,*) x(1:n)
  do i = 1, n
    a(x(i)) = i
    l(x(i)) = i
    r(x(i)) = n-i
    idx(x(i)) = i
  end do
  do i = 1, n*n
    l(i) = l(i)+l(i-1)
  end do
  do i = n*n, 1, -1
    r(i) = r(i)+r(i+1)
  end do
  do i = 1, n
    if (x(i) < l(x(i)) .or. x(i) > n*n-r(x(i))) then
      write(*,'(a)') "No"
      stop
    end if
  end do
  m = 0
  do i = 1, n*n
    if (idx(i) == 0) cycle
    c = 1
    do while (c < idx(i))
      m = m+1
      if (a(m) > 0) cycle
      a(m) = idx(i)
      c = c+1
    end do
  end do
  do i = 1, n*n
    if (idx(i) > 0 .and. idx(i) /= n) then
      k = idx(i)
      j = i
      exit
    end if
  end do
  c = 0
  do while (m < n*n)
    m = m+1
    if (a(m) > 0) cycle
    a(m) = k
    c = c+1
    if (c == n-k) then
      do i = j+1, n*n
        if (idx(i) > 0 .and. idx(i) /= n) then
          k = idx(i)
          j = i
          exit
        end if
      end do
      c = 0
    end if
  end do
  write(*,'(a)') "Yes"
  write(*,'(i0)',advance='no') a(1)
  do i = 2, n*n
    write(*,'(x,i0)',advance='no') a(i)
  end do
  write(*,*)
  stop
end program k_th_k