#include <bits/stdc++.h>
using namespace std;
static const int INF = 500000000;
template <class T>
void debug(T a, T b) {
  for (; a != b; ++a) cerr << *a << ' ';
  cerr << endl;
}
int n;
int stk[1000005];
int p[1000005], neg[1000005];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &p[i]);
  int m;
  scanf("%d", &m);
  for (int i = 0; i < m; ++i) {
    int a;
    scanf("%d", &a);
    --a;
    neg[a] = 1;
  }
  m = 0;
  for (int i = n - 1; i >= 0; --i) {
    if (neg[i])
      stk[m++] = p[i];
    else {
      if (m > 0 && stk[m - 1] == p[i])
        --m;
      else
        neg[i] = 1, stk[m++] = p[i];
    }
  }
  if (m > 0)
    puts("NO");
  else {
    puts("YES");
    for (int i = 0; i < n; ++i) printf("%d\n", (neg[i] ? -1 : 1) * p[i]);
  }
  return 0;
}
