#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 5;
const int MAXM = 1e5 + 5;
const int mod = 1e9 + 7;
int n, m, x[MAXN], y[MAXN], s[MAXN], len;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x[i]);
  }
  scanf("%d", &m);
  memset(y, 0, sizeof(y));
  for (int i = 1; i <= m; i++) {
    int a;
    scanf("%d", &a);
    y[a] = -1;
  }
  len = -1;
  for (int i = n; i >= 1; i--) {
    if (y[i] == -1) {
      s[++len] = -x[i];
      continue;
    }
    if (len == -1 || s[len] != -x[i]) {
      s[++len] = -x[i];
      y[i] = -1;
    } else {
      y[i] = 1;
      len--;
    }
  }
  if (len != -1)
    puts("NO");
  else {
    puts("YES");
    for (int i = 1; i <= n; i++) {
      printf("%d ", x[i] * y[i]);
    }
    puts("");
  }
  return 0;
}
