#include <bits/stdc++.h>
using namespace std;
int ar[1000006];
int br[1000006];
bool pos[1000006];
int ans[1000006];
int main() {
  int n, q;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &ar[i]);
  scanf("%d", &q);
  for (int i = 1; i <= q; i++) {
    int p;
    scanf("%d", &p);
    pos[p] = true;
  }
  for (int i = 1; i <= n; i++) {
    if (pos[i] == true) ar[i] = -ar[i];
  }
  stack<int> S;
  for (int i = n; i >= 1; i--) {
    if (ar[i] > 0) {
      if (S.empty())
        S.push(i);
      else {
        int t = S.top();
        if (abs(ar[t]) == abs(ar[i])) {
          ans[i] = abs(ar[t]);
          ans[t] = -abs(ar[i]);
          S.pop();
        } else
          S.push(i);
      }
    } else {
      S.push(i);
    }
  }
  if (!S.empty()) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (int i = 1; i <= n; i++) {
    printf("%d", ans[i]);
    if (i < n) printf(" ");
  }
  puts("");
  return 0;
}
