#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
int ar[1000001], on[1000001];
stack<int> S;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long a, b, c, d = 0, e, f = 0, g, h = 0, x, y, z = 0;
  cin >> a;
  for (int i = (0); i < (a); ++i) cin >> ar[i];
  cin >> b;
  for (int i = (0); i < (b); ++i) {
    cin >> c;
    on[c - 1] = 1;
  }
  for (int i = a - 1; i >= 0; i--) {
    if (S.empty() || on[i] || S.top() != ar[i]) {
      S.push(ar[i]);
      ar[i] *= -1;
    } else {
      S.pop();
    }
  }
  if (!S.empty())
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = (0); i < (a); ++i) cout << ar[i] << " ";
    cout << endl;
  }
}
