#include <bits/stdc++.h>
using namespace std;
int p[1000000 + 5], num[1000000 + 5],
    cnt = 0, t, qd[1000000 + 5], n, ans[1000000 + 5], stk[1000000 + 5], en = 0;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", p + i), num[i] = p[i];
  }
  sort(num + 1, num + 1 + n);
  cnt = unique(num + 1, num + 1 + n) - num - 1;
  for (int i = 1; i <= n; i++)
    p[i] = lower_bound(num + 1, num + 1 + cnt, p[i]) - num;
  scanf("%d", &t);
  for (int i = 1; i <= t; i++) {
    int x;
    scanf("%d", &x);
    qd[x] = 1;
  }
  for (int i = n; i >= 1; i--)
    if (qd[i]) {
      ans[i] = -p[i];
      stk[++en] = i;
    } else {
      if (p[stk[en]] == p[i])
        ans[i] = p[i], en--;
      else
        stk[++en] = i, ans[i] = -p[i];
    }
  if (en)
    puts("NO");
  else {
    puts("YES");
    for (int i = 1; i <= n; i++)
      printf("%d ", num[abs(ans[i])] * (ans[i] < 0 ? -1 : 1));
    puts("");
  }
  return 0;
}
