#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, m;
int a[1000010];
int zhan[1000010], top;
int main() {
  int i;
  n = read();
  for (i = 1; i <= n; i++) a[i] = read();
  m = read();
  for (i = 1; i <= m; i++) a[read()] *= -1;
  for (i = n; i >= 1; i--) {
    if (a[i] < 0)
      zhan[++top] = i;
    else if (top && a[i] + a[zhan[top]] == 0)
      top--;
    else if (top && a[i] == a[zhan[top]]) {
      a[i] *= -1;
      top--;
    } else {
      a[i] *= -1;
      zhan[++top] = i;
    }
  }
  if (top)
    puts("NO");
  else {
    puts("YES");
    for (i = 1; i <= n; i++) {
      printf("%d ", a[i]);
    }
  }
}
