#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int N = 1e6 + 10;
int v[N];
int inv[N];
bool neg[N];
unordered_map<int, int> comp;
int nxt = 1;
int s[N];
int idx[N];
int sp = 0;
void clear(int val) {
  while (sp > 0 && s[sp] != val) {
    stack<pair<int, int> > sn;
    sn.push({s[sp], idx[sp--]});
    while (sp > 0 && !sn.empty()) {
      if (sn.top().first == s[sp])
        neg[sn.top().second] = true, sn.pop(), sp--;
      else
        sn.push({s[sp], idx[sp--]});
    }
    if (!sn.empty()) {
      puts("NO");
      exit(0);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i];
  int negc;
  cin >> negc;
  while (negc--) {
    int a;
    cin >> a;
    neg[a] = true;
  }
  for (int i = 1; i <= n; i++) {
    int val = v[i];
    if (neg[i]) {
      while (sp > 1 && s[sp] != val) {
        clear(val);
      }
      if (sp > 0 && s[sp] == val)
        sp -= 1;
      else {
        return 0 * puts("NO");
      }
    } else {
      s[++sp] = val;
      idx[sp] = i;
    }
  }
  clear(-1);
  cout << "YES" << '\n';
  for (int i = 1; i <= n; i++) {
    int val = v[i];
    if (neg[i]) val = -val;
    cout << val << " ";
  }
  cout << '\n';
  return 0;
}
