#include <bits/stdc++.h>
using namespace std;
long long a[1000005];
long long x[1000005];
stack<long long> s;
long long n, m;
bool opn[1000005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  reverse(a + 1, a + n + 1);
  cin >> m;
  for (long long i = 1; i <= m; i++) {
    long long x;
    cin >> x;
    opn[n + 1 - x] = true;
  }
  for (long long i = 1; i <= n; i++) {
    if (opn[i]) {
      s.push(a[i]);
      x[i] = -1;
    } else {
      if (s.empty()) {
        s.push(a[i]);
        x[i] = -1;
        continue;
      }
      if (s.top() == a[i]) {
        s.pop();
        x[i] = 1;
        continue;
      }
      s.push(a[i]);
      x[i] = -1;
    }
  }
  if (s.empty() == false) {
    cout << "NO\n";
  } else {
    cout << "YES\n";
    for (long long i = 1; i <= n; i++)
      cout << x[n + 1 - i] * a[n + 1 - i] << " ";
  }
  return 0;
}
