#include <bits/stdc++.h>
using namespace std;
namespace Fast_read {
inline char gc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
template <typename T>
inline void read(T &x) {
  x = (T)0;
  T f = 1;
  char ssd = gc();
  while (ssd < '0' || ssd > '9') f = ssd == '-' ? -1 : 1, ssd = gc();
  while (ssd >= '0' && ssd <= '9')
    x = (x << 3) + (x << 1) + (ssd - '0'), ssd = gc();
  x = x * f;
}
};  // namespace Fast_read
using namespace Fast_read;
const int maxn = 1e6 + 10;
int n;
bool vis[maxn];
long long sta[maxn];
int top;
long long F[maxn];
long long Num[maxn];
int main() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; i += 1) scanf("%lld", &Num[i]);
  int zero;
  scanf("%d", &zero);
  for (register int i = 1, x; i <= zero; i += 1) {
    scanf("%d", &x);
    vis[x] = true;
  }
  for (register int i = n; i; i -= 1) {
    if (vis[i]) {
      F[i] = -Num[i];
      sta[++top] = F[i];
    } else {
      if (top && sta[top] == -Num[i])
        top -= 1, F[i] = Num[i];
      else
        F[i] = -Num[i], sta[++top] = F[i];
    }
  }
  if (top) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (register int i = 1; i <= n; i += 1) printf("%lld ", F[i]);
  puts("");
  return 0;
}
