#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<long long> v(n + 2);
  v[0] = 1000000007;
  for (long long i = 1; i <= n; i++) cin >> v[i];
  v[n + 1] = -1000000007;
  long long t;
  cin >> t;
  while (t--) {
    long long p;
    cin >> p;
    v[p] = -v[p];
  }
  stack<pair<long long, long long> > st, aux;
  for (long long i = 0; i <= n + 1; i++) {
    if (v[i] < 0) {
      while (st.size()) {
        pair<long long, long long> tp = st.top();
        st.pop();
        if (aux.empty() && tp.first == abs(v[i]))
          break;
        else if (aux.empty() && tp.first != abs(v[i]))
          aux.push(tp);
        else if (aux.top().first == tp.first) {
          pair<long long, long long> p = aux.top();
          aux.pop();
          v[p.second] = -v[p.second];
        } else
          aux.push(tp);
      }
      if (aux.size()) {
        cout << "NO";
        return 0;
      }
    } else
      st.push({v[i], i});
  }
  cout << "YES" << '\n';
  for (long long i = 1; i <= n; i++) cout << v[i] << ' ';
}
