#include <bits/stdc++.h>
using namespace std;
void scanF(int &x) {
  int c = getchar();
  x = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
}
int n, m, pos[1000007], edt[1000007], S[1000007], rev[1000007];
string ret;
map<int, int> mp, id;
stack<int> st;
bool solve() {
  for (int i = 0; i < n; i++) {
    if (ret[i] == '(' || st.empty()) {
      ret[i] = '(';
      st.push(i);
    } else {
      int u = st.top();
      if (rev[u] != rev[i]) {
        ret[i] = '(';
        st.push(i);
      } else {
        int second = S[i - 1] - (u ? S[u - 1] : 0);
        if (second == 1) {
          ret[i] = ')';
          st.pop();
        } else {
          ret[i] = '(';
          st.push(i);
        }
      }
    }
    if (ret[i] == '(')
      S[i] = 1;
    else
      S[i] = -1;
    S[i] += (i ? S[i - 1] : 0);
  }
  return st.empty();
}
int main() {
  scanF(n);
  for (int i = 0; i < n; i++) scanF(pos[i]);
  for (int i = 0; i < n; i++) rev[i] = pos[n - i - 1];
  for (int i = 0; i < n; i++) ret += '-';
  scanF(m);
  for (int i = 1; i <= m; i++) {
    scanF(edt[i]);
    ret[edt[i] - 1] = '(';
  }
  reverse(ret.begin(), ret.end());
  int ans = solve();
  if (!ans)
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = n - 1; i >= 0; i--) {
      if (ret[i] == '(')
        printf("%d ", rev[i] * -1);
      else
        printf("%d ", rev[i]);
    }
  }
  return 0;
}
