#include <bits/stdc++.h>
using namespace std;
vector<int> op;
stack<int> s;
int n;
int ar[1000000];
int ans[1000000];
int aft[1000001];
int bfr[1000001];
int deal(int p) {
  if (bfr[p] >= 0) aft[bfr[p]] = aft[p];
  if (aft[p] < n) bfr[aft[p]] = bfr[p];
  return aft[p];
}
int solve(int pos) {
  ans[pos] = -1;
  s.push(ar[pos]);
  bool suc = false;
  pos = deal(pos);
  while (pos < n) {
    if (!s.empty() && s.top() == ar[pos]) {
      s.pop();
      ans[pos] = 1;
    } else {
      ans[pos] = -1;
      s.push(ar[pos]);
    }
    pos = deal(pos);
    if (s.empty()) {
      suc = true;
      break;
    }
  }
  return suc ? pos : 0;
}
int main() {
  int t, i;
  scanf("%d", &n);
  for (i = n - 1; i >= 0; i--) {
    scanf("%d", &ar[i]);
    aft[i] = i + 1;
    bfr[i] = i - 1;
  }
  aft[n] = 0;
  bfr[n] = -1;
  scanf("%d", &t);
  for (i = 0; i < t; i++) {
    int x;
    scanf("%d", &x);
    op.push_back(n - x);
  }
  sort(op.begin(), op.end());
  for (i = t - 1; i >= 0; i--) {
    if (!solve(op[i])) {
      printf("NO\n");
      return 0;
    }
  }
  int pos = aft[n];
  while (pos < n) {
    pos = solve(pos);
    if (pos == 0) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  for (i = n - 1; i >= 0; i--) printf("%d ", ar[i] * ans[i]);
  puts("");
  return 0;
}
