#include <bits/stdc++.h>
using namespace std;
int i, j, k, n, m, x, y, t, s[1000010], f[1000010], a[1000010];
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    f = ch == '-' ? -f : f;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
  return x * f;
}
int main() {
  n = read();
  for (i = 1; i <= n; i++) a[i] = read();
  m = read();
  for (i = 1; i <= m; i++) f[read()] = -1;
  for (i = n; i >= 1; i--)
    if (f[i] == -1) {
      s[++s[0]] = a[i];
    } else if (!s[0]) {
      s[++s[0]] = a[i];
      f[i] = -1;
    } else {
      if (s[s[0]] == a[i]) {
        f[i] = 1;
        s[0]--;
      } else {
        f[i] = -1;
        s[++s[0]] = a[i];
      }
    }
  if (s[0])
    printf("NO\n");
  else {
    printf("YES\n");
    for (i = 1; i <= n; i++) printf("%d ", f[i] * a[i]);
    printf("\n");
  }
  return 0;
}
