#include <bits/stdc++.h>
using namespace std;
int a[1000010];
int st[1000010];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int t;
  scanf("%d", &t);
  int h = 0;
  for (int i = 0; i < t; i++) {
    int temp;
    scanf("%d", &temp);
    a[temp] = -a[temp];
  }
  for (int i = n; i >= 1; i--) {
    st[h++] = i;
    while (h > 1 && abs(a[st[h - 1]]) == abs(a[st[h - 2]])) {
      if (a[st[h - 1]] > 0) {
        a[st[h - 2]] = a[st[h - 1]] * (-1);
        h -= 2;
      } else
        break;
    }
  }
  if (h > 0)
    printf("NO\n");
  else {
    printf("YES\n");
    printf("%d", a[1]);
    for (int i = 2; i <= n; i++) printf(" %d", a[i]);
    printf("\n");
  }
  return 0;
}
