#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 3;
int n, m, a[N], b[N], sta[N], top = 0, ans[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  scanf("%d", &m);
  for (int i = 1; i <= m; i++) {
    int x;
    scanf("%d", &x);
    b[x] = 1;
  }
  for (int i = n; i >= 1; i--) {
    if (b[i] || sta[top] != a[i]) {
      sta[++top] = a[i];
      ans[i] = -1;
    } else {
      top--;
      ans[i] = 1;
    }
  }
  if (top) printf("NO\n");
  if (!top) {
    printf("YES\n");
    for (int i = 1; i <= n; i++) printf("%d ", a[i] * ans[i]);
  }
  return 0;
}
