#include <bits/stdc++.h>
using namespace std;
int a[1000010], q[1000010], st[1000010], ans[1000010], hh[1000010];
map<int, int> vis, cnt;
int solve(int n, int t) {
  if (t * 2 > n) return 0;
  if (n % 2 == 1) return 0;
  int top = 0, p = 1;
  for (int i = 1; i <= n; i++) {
    if (i == q[p]) {
      int tail = 0;
      while (top > 0) {
        if (a[st[top - 1]] == a[i] && tail == 0) break;
        if (tail == 0 || a[hh[tail - 1]] != a[st[top - 1]]) {
          ans[st[top - 1]] = -1;
          hh[tail++] = st[top - 1];
        } else {
          ans[st[top - 1]] = 1;
          tail--;
        }
        top--;
      }
      if (top == 0) return 0;
      p++;
      ans[i] = -1;
      ans[st[top - 1]] = 1;
      top--;
      continue;
    }
    st[top++] = i;
  }
  int tail = 0;
  while (top > 0) {
    if (tail == 0 || a[hh[tail - 1]] != a[st[top - 1]]) {
      ans[st[top - 1]] = -1;
      hh[tail++] = st[top - 1];
    } else {
      ans[st[top - 1]] = 1;
      tail--;
    }
    top--;
  }
  if (tail != 0) return 0;
  puts("YES");
  for (int i = 1; i <= n; i++) printf("%d ", ans[i] * a[i]);
  return 1;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int t;
  scanf("%d", &t);
  for (int i = 1; i <= t; i++) scanf("%d", &q[i]);
  sort(q + 1, q + t + 1);
  if (!solve(n, t)) puts("NO");
  return 0;
}
