#include <bits/stdc++.h>
using namespace std;
int n, a[1000005], sta[1000005];
int f[1000005];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  int t;
  scanf("%d", &t);
  for (int i = 1; i <= t; i++) {
    int x;
    scanf("%d", &x);
    f[x] = 1;
  }
  int last = 0;
  for (int i = n; i >= 1; i--) {
    if (f[i] == 1) {
      last++;
      sta[last] = a[i];
      continue;
    }
    if (sta[last] == a[i]) {
      last--;
      continue;
    }
    f[i] = 1;
    last++;
    sta[last] = a[i];
  }
  if (last != 0) {
    printf("NO");
    return 0;
  }
  printf("YES\n");
  for (int i = 1; i <= n; i++) {
    if (f[i] == 1) {
      printf("%d ", -a[i]);
    } else {
      printf("%d ", a[i]);
    }
  }
  return 0;
}
