#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
int n, a[N], b[N], m;
int q[N], p[N], close[N] = {0}, s[N], top = 0;
void kt() {
  if (n % 2) {
    printf("NO");
    exit(0);
  }
  for (int i = 1; i <= n; ++i) b[i] = a[i];
  sort(b + 1, b + 1 + n);
  int t = 0, d = 0;
  b[n + 1] = 1e9 + 123;
  for (int i = 1; i <= n + 1; ++i)
    if (b[i] != t) {
      if (d % 2) {
        printf("NO");
        exit(0);
      }
      t = b[i], d = 1;
    } else
      d++;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", q + i);
  scanf("%d", &m);
  for (int i = 1; i <= m; ++i) scanf("%d", p + i);
  reverse(q + 1, q + 1 + n);
  for (int i = 1; i <= m; ++i) p[i] = n - p[i] + 1, close[p[i]] = 1;
  for (int i = 1; i <= n; ++i)
    if (top == 0 || close[i]) {
      top++;
      s[top] = i;
      a[i] = -q[i];
    } else if (q[i] != q[s[top]])
      top++, s[top] = i, a[i] = -q[i];
    else
      top--, a[i] = q[i];
  if (top > 0)
    printf("NO");
  else {
    printf("YES\n");
    for (int i = n; i >= 1; --i) printf("%d ", a[i]);
  }
  return 0;
}
