#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long mod = 1e9 + 7;
const int N = 1e6 + 10;
long long arr[N];
int sign[N];
stack<int> st;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n, t;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%lld", &arr[i]);
    sign[i] = 1;
  }
  scanf("%d", &t);
  for (int i = 1; i <= t; ++i) {
    int temp;
    scanf("%d", &temp);
    sign[temp] = -1;
  }
  for (int i = n; i >= 1; --i) {
    if (sign[i] == -1) {
      st.push(i);
      continue;
    }
    if (!st.empty() and arr[i] == arr[st.top()])
      st.pop();
    else {
      sign[i] = -1;
      st.push(i);
    }
  }
  if (!st.empty())
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 1; i <= n; ++i) printf("%lld ", sign[i] * arr[i]);
  }
  return 0;
}
