#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 1;
int n;
int p[MAXN];
list<int> S;
void fixStack() {
  list<int>::iterator it = S.end();
  it--;
  while (!S.empty() && p[*it] < 0) {
    if (it == S.begin()) {
      printf("NO\n");
      exit(0);
    }
    list<int>::iterator jt = it;
    jt--;
    if (p[*jt] == -p[*it]) {
      list<int>::iterator tmp = it;
      tmp++;
      bool lol = tmp == S.end();
      S.erase(it);
      S.erase(jt);
      it = tmp;
      if (!S.empty() && lol) {
        it = S.end();
        it--;
      }
    } else {
      it = jt;
      p[*it] *= -1;
    }
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &p[i]);
  }
  int t;
  scanf("%d", &t);
  for (int i = 0; i < t; i++) {
    int q;
    scanf("%d", &q);
    q--;
    p[q] *= -1;
  }
  for (int i = 0; i < n; i++) {
    S.push_back(i);
    fixStack();
  }
  while (!S.empty()) {
    p[S.back()] *= -1;
    fixStack();
  }
  printf("YES\n");
  for (int i = 0; i < n; i++) {
    printf("%d ", p[i]);
  }
  printf("\n");
}
