#include <bits/stdc++.h>
using namespace std;
int n, m, c, r, t, x, y, z;
int a[1000100], b[1000100];
stack<int> st;
int main() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  scanf("%d", &m);
  for (register int i = 1; i <= m; ++i) {
    scanf("%d", &x);
    b[x] = 1;
  }
  for (register int i = n; i >= 1; --i) {
    if (st.empty() || b[i] == 1 || a[st.top()] != a[i])
      st.push(i);
    else
      b[st.top()] = 1, st.pop();
  }
  if (!st.empty()) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (register int i = 1; i <= n; ++i) printf("%d ", b[i] ? -a[i] : a[i]);
}
