#include <bits/stdc++.h>
using namespace std;
FILE *in;
FILE *out;
const int MAX = 1048576;
int n, m;
int a[MAX], sign[MAX];
int main(void) {
  in = stdin;
  out = stdout;
  fscanf(in, "%d", &n);
  for (int i = 0; i < n; i++) fscanf(in, "%d", &a[i]);
  fscanf(in, "%d", &m);
  for (int i = 0; i < m; i++) {
    int idx;
    fscanf(in, "%d", &idx);
    sign[idx - 1] = -1;
  }
  bool flag = true;
  stack<pair<int, int> > s;
  for (int i = 0; i < n; i++) {
    if (sign[i] == -1) {
      stack<pair<int, int> > q;
      q.push(make_pair(a[i], i));
      while (!s.empty() && !q.empty()) {
        if (s.top().first == q.top().first) {
          sign[s.top().second] = +1;
          s.pop();
          sign[q.top().second] = -1;
          q.pop();
        } else {
          q.push(s.top());
          s.pop();
        }
      }
      if (s.empty() && !q.empty()) {
        flag = false;
        break;
      }
    } else {
      s.push(make_pair(a[i], i));
    }
  }
  while (!s.empty()) {
    stack<pair<int, int> > q;
    q.push(s.top());
    s.pop();
    while (!s.empty() && !q.empty()) {
      if (s.top().first == q.top().first) {
        sign[s.top().second] = +1;
        s.pop();
        sign[q.top().second] = -1;
        q.pop();
      } else {
        q.push(s.top());
        s.pop();
      }
    }
    if (s.empty() && !q.empty()) {
      flag = false;
      break;
    }
  }
  fprintf(out, "%s\n", flag ? "YES" : "NO");
  if (flag) {
    for (int i = 0; i < n; i++)
      fprintf(out, "%d%c", a[i] * sign[i], i + 1 == n ? '\n' : ' ');
  }
  return 0;
}
