As you know, Vova has recently become a new shaman in the city of Ultima Thule. So, he has received the shaman knowledge about the correct bracket sequences. The shamans of Ultima Thule have been using lots of different types of brackets since prehistoric times. A bracket type is a positive integer. The shamans define a correct bracket sequence as follows:  An empty sequence is a correct bracket sequence.  If {a1, a2, ..., al} and {b1, b2, ..., bk} are correct bracket sequences, then sequence {a1, a2, ..., al, b1, b2, ..., bk} (their concatenation) also is a correct bracket sequence.  If {a1, a2, ..., al} — is a correct bracket sequence, then sequence  also is a correct bracket sequence, where v (v > 0) is an integer. For example, sequences {1, 1,  - 1, 2,  - 2,  - 1} and {3,  - 3} are correct bracket sequences, and {2,  - 3} is not.Moreover, after Vova became a shaman, he learned the most important correct bracket sequence {x1, x2, ..., xn}, consisting of n integers. As sequence x is the most important, Vova decided to encrypt it just in case.Encrypting consists of two sequences. The first sequence {p1, p2, ..., pn} contains types of brackets, that is, pi = |xi| (1 ≤ i ≤ n). The second sequence {q1, q2, ..., qt} contains t integers — some positions (possibly, not all of them), which had negative numbers in sequence {x1, x2, ..., xn}.Unfortunately, Vova forgot the main sequence. But he was lucky enough to keep the encryption: sequences {p1, p2, ..., pn} and {q1, q2, ..., qt}. Help Vova restore sequence x by the encryption. If there are multiple sequences that correspond to the encryption, restore any of them. If there are no such sequences, you should tell so.

The first line of the input contains integer n (1 ≤ n ≤ 106). The second line contains n integers: p1, p2, ..., pn (1 ≤ pi ≤ 109). The third line contains integer t (0 ≤ t ≤ n), followed by t distinct integers q1, q2, ..., qt (1 ≤ qi ≤ n). The numbers in each line are separated by spaces.

Print a single string "NO" (without the quotes) if Vova is mistaken and a suitable sequence {x1, x2, ..., xn} doesn't exist. Otherwise, in the first line print "YES" (without the quotes) and in the second line print n integers x1, x2, ..., xn (|xi| = pi; xqj < 0). If there are multiple sequences that correspond to the encrypting, you are allowed to print any of them.

import java.io.*;
import java.util.*;

public class cf286c {
  public static void main(String[] args) {
    FastIO in = new FastIO(), out = in;
    int n = in.nextInt();
    if(n%2 == 1) {
      out.println("NO");
      out.close();
      return;
    }
    int[] v = new int[n];
    for(int i=0; i<n; i++) v[i] = in.nextInt();
    int m = in.nextInt();
    for(int i=0; i<m; i++)
      v[in.nextInt()-1] *= -1;
    Stack<Pair<Integer,Integer>> stk1 = new Stack<>();
    Stack<Pair<Integer,Integer>> stk2 = new Stack<>();
    boolean fail = false;
    for(int i=0; i<n; i++) {
      if(v[i] > 0) stk1.add(new Pair<Integer,Integer>(v[i],i));
      else stk2.add(new Pair<Integer,Integer>(v[i],i));
      while(stk2.size() != 0 || (i==n-1 && stk1.size() != 0)) {
        if(stk1.size() == 0) {
          fail = true;
          break;
        }
        if(stk2.size() > 0 && stk1.peek().first == -stk2.peek().first) {
          stk1.pop();
          stk2.pop();
        }
        else {
          Pair<Integer,Integer> p = stk1.pop();
          p.first *= -1;
          v[p.second] = p.first;
          stk2.push(p);
        }
      }
    }
    if(fail) out.println("NO");
    else {
      out.println("YES");
      for(int x : v) out.print(x+ " ");
    }
    out.close();
  }
  static class Pair<T1,T2> {
    T1 first;
    T2 second;
    Pair(T1 a, T2 b) {
      first = a; second = b;
    }
    public String toString() {
      return first + ":" + second;
    }
  }

  static class FastIO extends PrintWriter {
    BufferedReader br;
    StringTokenizer st;

    public FastIO() {
      this(System.in, System.out);
    }

    public FastIO(InputStream in, OutputStream out) {
      super(new BufferedWriter(new OutputStreamWriter(out)));
      br = new BufferedReader(new InputStreamReader(in));
      scanLine();
    }

    public void scanLine() {
      try {
        st = new StringTokenizer(br.readLine().trim());
      } catch (Exception e) {
        throw new RuntimeException(e.getMessage());
      }
    }

    public int numTokens() {
      if (!st.hasMoreTokens()) {
        scanLine();
        return numTokens();
      }
      return st.countTokens();
    }

    public String next() {
      if (!st.hasMoreTokens()) {
        scanLine();
        return next();
      }
      return st.nextToken();
    }

    public double nextDouble() {
      return Double.parseDouble(next());
    }

    public long nextLong() {
      return Long.parseLong(next());
    }

    public int nextInt() {
      return Integer.parseInt(next());
    }
  }
}

import java.io.*;
import java.util.*;
public class z3 {
	public static void main(String[] args) throws IOException {
		StreamTokenizer in;
		PrintWriter out;
		in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
		out = new PrintWriter(new OutputStreamWriter(System.out));

		 in.nextToken();
		 int n=(int) in.nval;
	int[] a = new int[n];
	for (int i=0;i<n;i++) {in.nextToken(); a[i]=(int) in.nval;}
	in.nextToken();
	int t=(int) in.nval;
	int temp;
	for (int i=0;i<t;i++) {in.nextToken(); temp=(int) in.nval;a[temp-1]=-Math.abs(a[temp-1]);}
	if ((n%2)!=0) {out.println("NO");out.flush();}
	else
	  {
		int kol=0;int[] st=new int[n+1];
		  for (int i=n-1;i>=0;i--)
		  {
			  if (kol==0) {kol=1;st[kol]=Math.abs(a[i]);a[i]=-st[kol];} else
			  {
				  if (st[kol]==a[i]) kol-=1; else
				  {kol+=1;st[kol]=Math.abs(a[i]);a[i]=-st[kol];}
			  }
		  }
		  if (kol!=0) {out.println("NO");out.flush();} else
		  {
			  out.println("YES");
			  for (int i=0;i<n;i++) out.print(""+a[i]+" ");
			  out.flush();
		  }
	}
}
}

import java.io.*;
import java.util.*;
public class z3 {
	private static BufferedReader in;
	private static StringTokenizer tok;
	private static String readToken() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	private static int readInt() throws IOException {
		return Integer.parseInt(readToken());
	}

	public static void main(String[] args) throws IOException {
		PrintWriter out;
		in = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(new OutputStreamWriter(System.out));
		int n=readInt();
	int[] a = new int[n];
	for (int i=0;i<n;i++) a[i]=readInt();
	int t=readInt();
	int temp;
	for (int i=0;i<t;i++) {temp=readInt();a[temp-1]=-Math.abs(a[temp-1]);}
	if ((n%2)!=0) {out.println("NO");out.flush();}
	else
	  {
		int kol=0;int[] st=new int[n+1];
		  for (int i=n-1;i>=0;i--)
		  {
			  if (kol==0) {kol=1;st[kol]=Math.abs(a[i]);a[i]=-st[kol];} else
			  {
				  if (st[kol]==a[i]) kol-=1; else
				  {kol+=1;st[kol]=Math.abs(a[i]);a[i]=-st[kol];}
			  }
		  }
		  if (kol!=0) {out.println("NO");out.flush();} else
		  {
			  out.println("YES");
			  for (int i=0;i<n;i++) {out.print(a[i]);out.print(' ');}
			  out.flush();
		  }
	}
}
}

import java.io.*;
import java.util.*;
public class z3 {
	public static void main(String[] args) throws IOException {
		StreamTokenizer in;
		PrintWriter out;
		in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
		out = new PrintWriter(new OutputStreamWriter(System.out));

		 in.nextToken();
		 int n=(int) in.nval;
	int[] a = new int[n];
	for (int i=0;i<n;i++) {in.nextToken(); a[i]=(int) in.nval;}
	in.nextToken();
	int t=(int) in.nval;
	int temp;
	for (int i=0;i<t;i++) {in.nextToken(); temp=(int) in.nval;a[temp-1]=-Math.abs(a[temp-1]);}
	if ((n%2)!=0) {out.println("NO");out.flush();}
	else
	  {
		int kol=0;int[] st=new int[n+1];
		  for (int i=n-1;i>=0;i--)
		  {
			  if (kol==0) {kol=1;st[kol]=Math.abs(a[i]);a[i]=-st[kol];} else
			  {
				  if (st[kol]==a[i]) kol-=1; else
				  {kol+=1;st[kol]=Math.abs(a[i]);a[i]=-st[kol];}
			  }
		  }
		  if (kol!=0) {out.println("NO");out.flush();} else
		  {
			  out.println("YES");
			  for (int i=0;i<n;i++) {out.print(a[i]);out.print(' ');}
			  out.flush();
		  }
	}
}
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author vadimmm
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskE {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int counter = in.nextInt();
        int[] bracket = new int[counter];
        int[] stack = new int[counter];
        int size = 0;
        for (int i = 0; i < counter; ++i)
            bracket[i] = in.nextInt();
        counter = in.nextInt();
        for (int i = 0; i < counter; ++i) {
            int index = in.nextInt() - 1;
            bracket[index] = -bracket[index];
        }
        for (int i = bracket.length - 1; i >= 0; --i) {
            if (bracket[i] < 0)
                stack[size++] = bracket[i];
            else if (size > 0 && stack[size - 1] + bracket[i] == 0)
                size--;
            else {
                bracket[i] = -bracket[i];
                stack[size++] = bracket[i];
            }
        }
        if (size > 0)
            out.println("NO");
        else {
            out.println("YES");
            for (int i : bracket) {
                out.print(i);
                out.print(" ");
            }
        }
    }
}

class InputReader {

    private static BufferedReader bufferedReader;
    private static StringTokenizer stringTokenizer;

    public InputReader(InputStream inputStream) {
        bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
        stringTokenizer = null;
    }

    public String next() {
        while(stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
            try {
                stringTokenizer = new StringTokenizer(bufferedReader.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return stringTokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    }

import java.io.BufferedReader;
import java.io.StreamTokenizer;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.Reader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskE {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n % 2 != 0) {
            out.print("NO");
            return;
        }
        int[] p = new int[n];
        for (int i = 0; i < n; i++) {
            p[i] = in.nextInt();
        }
        int t = in.nextInt();
        for (int i = 0; i < t; i++) {
            int k = in.nextInt();
            p[k - 1] *= -1;
        }

        int[] s = new int[n];
        int h = -1;

        for (int i = n - 1; i >= 0; i--) {
            if (p[i] < 0 || h < 0 || s[h] != p[i]) {
                if (p[i] > 0)
                    p[i] *= -1;
                h++;
                s[h] = -p[i];
            } else {
                h--;
            }
        }

        if (h >= 0) {
            out.print("NO");
            return;
        }

        out.println("YES");
        for (int i = 0; i < n; i++) {
            out.print(p[i]);
            out.print(' ');
        }
    }
}

class InputReader {
    private StreamTokenizer tokenizer;

    public InputReader(InputStream stream) {
        Reader r = new BufferedReader(new InputStreamReader(stream));
        tokenizer = new StreamTokenizer(r);
        tokenizer.eolIsSignificant(false);
    }

    public int nextInt() {
        try {
            int i = tokenizer.nextToken();
            if (i == StreamTokenizer.TT_NUMBER)
                return (int) tokenizer.nval;
            else
                throw new InputMismatchException();
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

    }

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;

public class E {
    static int[] A;
    static int inf = (int) 2e9;
    static int[] s;
    static int[] p;
    static int indexS = -1;
    static int indexP = -1;

    public static boolean collapse(int x) {
        p[++indexP] = x;
        while (indexP != -1) {
            if (indexS == -1)
                return false;
            int y = p[indexP];
            int z = s[indexS--];
            if (-A[z] != y) {
                A[z] *= -1;
                p[++indexP] = A[z];
            } else
                --indexP;
        }
        return true;
    }

    public static boolean solve() {
        for (int i = 0; i < A.length; i++)
            if (A[i] > 0)
                s[++indexS] = i;
            else if (!collapse(A[i]))
                return false;
        return true;
    }

    public static void main(String[] args) throws NumberFormatException,
            IOException {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = in.readInt();
        A = new int[n + 2];
        A[0] = inf;
        A[n + 1] = -inf;
        s = new int[n + 2];
        p = new int[n + 2];
        for (int i = 0; i < n; i++)
            A[i + 1] = in.readInt();
        int k = in.readInt();
        for (int i = 0; i < k; i++)
            A[in.readInt()] *= -1;
        if (solve()) {
            out.println("YES");
            for (int i = 1; i <= n; i++)
                out.print(A[i] + " ");
            out.println();
        } else
            out.println("NO");
        out.flush();
        out.close();
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1000];
    private int curChar, numChars;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    private int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public long readLong() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        long res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public String readString() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        StringBuffer res = new StringBuffer();
        do {
            res.appendCodePoint(c);
            c = read();
        } while (!isSpaceChar(c));
        return res.toString();
    }

    private boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private String readLine0() {
        StringBuffer buf = new StringBuffer();
        int c = read();
        while (c != '\n' && c != -1) {
            buf.appendCodePoint(c);
            c = read();
        }
        return buf.toString();
    }

    public String readLine() {
        String s = readLine0();
        while (s.trim().length() == 0)
            s = readLine0();
        return s;
    }

    public String readLine(boolean ignoreEmptyLines) {
        if (ignoreEmptyLines)
            return readLine();
        else
            return readLine0();
    }

    public char readCharacter() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        return (char) c;
    }

    public double readDouble() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        double res = 0;
        while (!isSpaceChar(c) && c != '.') {
            if (c == 'e' || c == 'E')
                return res * Math.pow(10, readInt());
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        }
        if (c == '.') {
            c = read();
            double m = 1;
            while (!isSpaceChar(c)) {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                m /= 10;
                res += (c - '0') * m;
                c = read();
            }
        }
        return res * sgn;
    }
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

   private void solve() throws IOException {
      int n = ni();
      int p[] = nia(n);
      int t = ni();
      int q[] = niam1(t);
      boolean sgn[] = new boolean[n];
      for (Integer i : q) {
         sgn[i] = true;
      }
      int stack[] = new int[n];
      int tos = 0;

      for (int i = n - 1; i >= 0; --i) {
         int brt = p[i];
         if (tos > 0 && p[stack[tos - 1]] == brt && !sgn[i])
            --tos;
         else {
            stack[tos++] = i;
            sgn[i] = true;
         }
      }

      if (tos != 0)
         prln("NO");
      else {
         prln("YES");
         for (int i = 0; i < n; ++i) {
            if (sgn[i])
               pr("-" + p[i] + " ");
            else
               pr(p[i] + " ");
         }
      }
   }

   public static void main(String[] args) {
      new Main().run();
   }

   public void run() {
      try {
         if (isFileIO) {
            pw = new PrintWriter(new File("output.out"));
            br = new BufferedReader(new FileReader("input.in"));
         } else {
            pw = new PrintWriter(System.out);
            br = new BufferedReader(new InputStreamReader(System.in));
         }
         solve();
         pw.close();
         br.close();
      } catch (IOException e) {
         System.err.println("IO Error");
      }
   }

   private int[] nia(int n) throws IOException {
      int arr[] = new int[n];
      for (int i = 0; i < n; ++i)
         arr[i] = Integer.parseInt(nextToken());
      return arr;
   }

   private int[] niam1(int n) throws IOException {
      int arr[] = new int[n];
      for (int i = 0; i < n; ++i)
         arr[i] = Integer.parseInt(nextToken()) - 1;
      return arr;
   }

   private long[] nla(int n) throws IOException {
      long arr[] = new long[n];
      for (int i = 0; i < n; ++i)
         arr[i] = Long.parseLong(nextToken());
      return arr;
   }

   private void pr(Object o) {
      pw.print(o);
   }

   private void prln(Object o) {
      pw.println(o);
   }

   private void prln() {
      pw.println();
   }

   int ni() throws IOException {
      return Integer.parseInt(nextToken());
   }

   long nl() throws IOException {
      return Long.parseLong(nextToken());
   }

   double nd() throws IOException {
      return Double.parseDouble(nextToken());
   }

   private String nextToken() throws IOException {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
         tokenizer = new StringTokenizer(br.readLine());
      }

      return tokenizer.nextToken();
   }

   // private void qsort(int a[]) {
   // Random rand = new Random(271828182l);
   // qsort(a, 0, a.length, rand);
   // }
   //
   // private void qsort(int a[], int l, int r, Random rand) {
   // if (r - l <= 1)
   // return;
   //
   // if (r - l == 2) {
   // if (a[r - 1] < a[l]) {
   // int t = a[r - 1];
   // a[r - 1] = a[l];
   // a[l] = t;
   // }
   //
   // return;
   // }
   //
   // int x = a[rand.nextInt(r - l) + l];
   // int i = l, j = r - 1;
   // while (i < j) {
   // while (a[i] < x)
   // ++i;
   // while (a[j] > x)
   // --j;
   // if (i < j) {
   // int t = a[i];
   // a[i] = a[j];
   // a[j] = t;
   // ++i;
   // --j;
   // }
   // }
   //
   // qsort(a, l, j + 1, rand);
   // qsort(a, i, r, rand);
   // }

   private BufferedReader br;
   private StringTokenizer tokenizer;
   private PrintWriter pw;
   private final boolean isFileIO = false;
}

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Stack;
import java.util.StringTokenizer;

public class E {
    public static void main(String[] args) throws Exception {
        int n = nextInt();
        int[] ar = new int[n];
        for (int i = 0; i < n; i++) {
            ar[i] = nextInt();
        }
        Stack<Integer> stack = new Stack<Integer>();
        int q = nextInt();
        int[] openBarcket = new int[n];
        for (int i = 0; i < q; i++) {
            openBarcket[nextInt() - 1] = 1;
        }
        for (int i = n - 1, j = 0; j < n; j++, i--) {
            if (stack.isEmpty() || stack.peek() != ar[i]) {
                stack.push(ar[i]);
            } else {
                if (openBarcket[i] == 1) {
                    stack.push(ar[i]);
                } else {
                    ar[i] *= -1;
                    stack.pop();
                }
            }
        }
        if (stack.isEmpty()) {
            PrintWriter out = new PrintWriter(System.out);
            out.println("YES");
            for (int i = 0; i < n; i++) {
                out.print((-ar[i]) + " ");
            }
            out.println();
            out.flush();
        } else {
            System.out.println("NO");
        }
    }

    static BufferedReader br = new BufferedReader(new InputStreamReader(
            System.in));
    static StringTokenizer tokenizer = new StringTokenizer("");

    static int nextInt() throws Exception {
        return Integer.parseInt(next());
    }

    static long nextLong() throws Exception {
        return Long.parseLong(next());
    }

    static double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }

    static String next() throws Exception {
        while (true) {
            if (tokenizer.hasMoreTokens()) {
                return tokenizer.nextToken();
            }
            String s = br.readLine();
            if (s == null) {
                return null;
            }
            tokenizer = new StringTokenizer(s);
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Stack;
import java.util.StringTokenizer;

public class Abood2D {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] P = new int[n];

		for (int i = 0; i < n; i++)
			P[i] = sc.nextInt();

		boolean[] Q = new boolean[n];
		boolean[] Ans = new boolean[n];
		boolean[] V = new boolean[n];

		int q = sc.nextInt();

		for (int i = 0; i < q; i++) {
			int x = sc.nextInt() - 1;
			Ans[x] = Q[x] = true;
		}

		int[] next = new int[n + 1];

		for (int i = 0; i <= n; i++)
			next[i] = i;

		for (int i = 0; i < n; i++) {
			if(Q[i]) {
				V[i] = true;
				Stack<Integer> s = new Stack<>();
				boolean f = false;
				for (int j = (i > 0 ? next[i - 1] : -1); j >= 0; j = (j > 0 ? next[j - 1] : -1)) {
					V[j] = true;
					if(P[j] == P[i] && s.isEmpty()) {
						f = true;
						next[i] = j > 0 ? next[j - 1] : -1;
						break;
					} else {
						if(!s.isEmpty() && P[s.peek()] == P[j])
							Ans[s.pop()] = true;
						else
							s.push(j);
					}
				}

				if(!f) {
					System.out.println("NO");
					return;
				}
			}
		}

		Stack<Integer> s = new Stack<>();

		for (int i = next[n - 1]; i >= 0; i--) {
			if(V[i])
				continue;
			if(!s.isEmpty() && P[s.peek()] == P[i])
				Ans[s.pop()] = true;
			else
				s.push(i);
		}

		if(s.isEmpty()) {
			out.println("YES");
			for (int i = 0; i < n; i++)
				out.print((Ans[i] ? -P[i] : P[i]) + " ");
			out.println();
		}else
			out.print("NO");

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.util.*;
import java.io.*;

public class Main{

    BufferedReader in;
    StringTokenizer str = null;
    PrintWriter out;

    private String next() throws Exception{
    	if (str == null || !str.hasMoreElements())
    	    str = new StringTokenizer(in.readLine());
    	return str.nextToken();
    }

    private int nextInt() throws Exception{
	   return Integer.parseInt(next());
    }

    int n;
    int []p;
    Map<Integer, Integer> map, cmap;
    Stack<Integer> stack;

    public void run() throws Exception{
    	in = new BufferedReader(new InputStreamReader(System.in));
    	out = new PrintWriter(System.out);

        n = nextInt();
        if (n % 2 == 1) {
            out.println("NO");
            out.close();
            return;
        }

        int p[] = new int[n];

        for(int i=0;i<n;i++){
            int x = nextInt();
            p[i] = x;
        }

        int m = nextInt();
        if (m > n/2) {
            out.println("NO");
            out.close();
            return;
        }

        for(int i=0;i<m;i++){
            int x = nextInt()-1;
            p[x]*=-1;
        }

        stack = new Stack<Integer>();
        for(int i=n-1;i>=0;i--){
            if (p[i] < 0) {
                stack.push(-1 * p[i]);
            }else{
                if (stack.size() > 0 && stack.peek() == p[i]){
                    stack.pop();
                }else{
                    stack.push(p[i]);
                    p[i]*=-1;
                }
            }
        }

        if (stack.size() > 0) {
            out.println("NO");
        }else{
            out.println("YES");
            for(int i=0;i<n;i++){
                out.print(p[i] + " ");
            }
            out.println();
        }
        out.close();
    }

    public static void main(String args[]) throws Exception{
	   new Main().run();
    }
}

import java.io.BufferedReader;
import java.io.StreamTokenizer;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.Reader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskE {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n % 2 != 0) {
            out.print("NO");
            return;
        }
        int[] p = new int[n];
        for (int i = 0; i < n; i++) {
            p[i] = in.nextInt();
        }
        int t = in.nextInt();
        for (int i = 0; i < t; i++) {
            int k = in.nextInt();
            p[k - 1] *= -1;
        }

        int[] s = new int[n];
        int h = -1;

        for (int i = n - 1; i >= 0; i--) {
            if (p[i] < 0 || h < 0 || s[h] != p[i]) {
                if (p[i] > 0)
                    p[i] *= -1;
                h++;
                s[h] = -p[i];
            } else {
                h--;
            }
        }

        if (h >= 0) {
            out.print("NO");
            return;
        }

        out.println("YES");
        for (int i = 0; i < n; i++) {
            out.print(p[i]);
            out.print(' ');
        }
    }
}

class InputReader {
    private StreamTokenizer tokenizer;

    public InputReader(InputStream stream) {
        Reader r = new BufferedReader(new InputStreamReader(stream));
        tokenizer = new StreamTokenizer(r);
        tokenizer.eolIsSignificant(false);
        tokenizer.wordChars(34, 255);
    }

    public int nextInt() {
        try {
            int i = tokenizer.nextToken();
            if (i == StreamTokenizer.TT_NUMBER)
                return (int) tokenizer.nval;
            else
                throw new InputMismatchException("type = " + i);
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

}

import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskE {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        if (n % 2 != 0) {
            out.print("NO");
            return;
        }
        int[] p = new int[n];
        for (int i = 0; i < n; i++) {
            p[i] = in.nextInt();
        }
        int t = in.nextInt();
        for (int i = 0; i < t; i++) {
            int k = in.nextInt();
            p[k - 1] *= -1;
        }

        int[] s = new int[n];
        int h = -1;

        for (int i = n - 1; i >= 0; i--) {
            if (p[i] < 0 || h < 0 || s[h] != p[i]) {
                if (p[i] > 0)
                    p[i] *= -1;
                h++;
                s[h] = -p[i];
            } else {
                h--;
            }
        }

        if (h >= 0) {
            out.print("NO");
            return;
        }

        out.println("YES");
        for (int i = 0; i < n; i++) {
            out.print(p[i]);
            out.print(' ');
        }

    }
}

class InputReader {
    private BufferedReader reader;
    private String[] line;
    private int index;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
    }

    public String next() {
        while (line == null) {
            try {
                line = reader.readLine().split("\\s");
                if (line.length == 0)
                    line = null;
                index = 0;
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        String res = line[index];
        index++;
        if (index == line.length)
            line = null;
        return res;
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = sc.nextInts();
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		Integer [] C = new Integer [N];
		for (int i : rep(T))
			C[Q[i] - 1] = 1;

		P = reverse(P);
		C = reverse(C);

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : rep(N))
			if (!L.isEmpty() && L.peekFirst().equals(P[i]) && C[i] == null) {
				L.removeFirst();
				C[i] = -1;
			} else {
				L.addFirst(P[i]);
				C[i] = 1;
			}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = reverse(sc.nextInts());
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		int [] C = new int [N];
		for (int i : rep(T))
			C[N - Q[i]] = 1;

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : rep(N)) {
			int p = P[i], s = C[i];
			if (!L.isEmpty() && L.peekFirst() == p && s == 0) { // close
				L.removeFirst();
				C[i] = -1;
			} else {
				L.addFirst(p);
				C[i] = 1;
			}
		}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in), (int)1e7));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.io.*;
import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = reverse(sc.nextInts());
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);
		sc = null;

		int [] C = new int [N];
		for (int i : rep(T))
			C[N - Q[i]] = 1;

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : rep(N)) {
			int p = P[i], s = C[i];
			if (!L.isEmpty() && L.peekFirst() == p && s == 0) { // close
				L.removeFirst();
				C[i] = -1;
			} else {
				L.addFirst(p);
				C[i] = 1;
			}
		}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			readToken();
			return new String(b, T[0], T[1] - T[0]);
		}

		public char nextChar() {
			readToken();
			return (char)b[T[0]];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			readToken();
			return calc(T[0], T[1]);
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			readLine();
			return new String(b, T[0], T[1] - T[0]);
		}

		public String [] next(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = next();
			return res;
		}

		public Integer [] nextInt(int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextInt();
			return res;
		}

		public Long [] nextLong(int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLong();
			return res;
		}

		public Double [] nextDouble(int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextDouble();
			return res;
		}

		public String [] nextLine(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLine();
			return res;
		}

		public String [] nextStrings() {
			readLine();
			int s = T[0], c = 0;
			String [] res = new String[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = new String(b, s, i - s);
					s = i+1;
				}
			res[c] = new String (b, s, T[1] - s);
			return res;
		}

		public char [] nextChars() {
			readToken();
			int c = 0;
			char [] res = new char[T[1] - T[0]];
			for (int i = T[0]; i < T[1]; ++i)
				res[c++] = (char)b[i];
			return res;
		}

		public Integer [] nextInts() {
			readLine();
			int s = T[0], c = 0;
			Integer [] res = new Integer[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = (int)calc(s, i);
					s = i+1;
				}
			res[c] = (int)calc(s, T[1]);
			return res;
		}

		public Long [] nextLongs() {
			readLine();
			int s = T[0], c = 0;
			Long [] res = new Long[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = calc(s, i);
					s = i+1;
				}
			res[c] = calc(s, T[1]);
			return res;
		}

		public Double [] nextDoubles() {
			readLine();
			int s = T[0], c = 0;
			Double [] res = new Double[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = Double.parseDouble(new String(b, s, i - s));
					s = i+1;
				}
			res[c] = Double.parseDouble(new String(b, s, T[1] - s));
			return res;
		}

		String [][] nextStrings(int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextStrings();
			return res;
		}

		char [][] nextChars(int N) {
			char [][] res = new char [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextChars();
			return res;
		}

		Integer [][] nextInts(int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextInts();
			return res;
		}

		Long [][] nextLongs(int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextLongs();
			return res;
		}

		Double [][] nextDoubles(int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private final static int MAX_SZ = (int)5e7;
		private final byte [] b = new byte[MAX_SZ];
		private final int [] T = new int [2];
		private int cur = 0;

		MyScanner () {
			try {
				InputStream is = new BufferedInputStream(System.in);
				while (is.available() == 0)
					Thread.sleep(1);
				start();
				int off = 0, c;
				while ((c = is.read(b, off, MAX_SZ - off)) != -1)
					off += c;
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private void readLine() {
			int c;
			for (c = cur; b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == LF || b[cur] == CR; ++cur);
		}

		private void readToken() {
			int c;
			for (c = cur; b[c] != SPACE && b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == SPACE || b[cur] == LF || b[cur] == CR; ++cur);
		}

		private int count(int s, int e) {
			int cnt = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == SPACE)
					++cnt;
			return cnt;
		}

		private long calc(int s, int e) {
			long res = 0, f = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == '-')
					f = -1;
				else
					res = 10 * res + b[i] - '0';
			return res * f;
		}

		private static final char LF = '\n';
		private static final char CR = '\r';
		private static final char SPACE = ' ';
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = sc.nextInts();
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		Integer [] C = new Integer [N]; fill(C, 0);
		for (int i : rep(T))
			C[Q[i] - 1] = 1;

		P = reverse(P);
		C = reverse(C);

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : rep(N)) {
			int p = P[i], s = C[i];
			if (!L.isEmpty() && L.peekFirst() == p && s == 0) {
				L.removeFirst();
				C[i] = -1;
			} else {
				L.addFirst(p);
				C[i] = 1;
			}
		}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = reverse(sc.nextInts());
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		int [] C = new int [N];
		for (int i : rep(T))
			C[N - Q[i]] = 1;

		Deque<Integer> L = new LinkedList<Integer>(); int Y = 0;
		for (int i : rep(N)) {
			int p = P[i], s = C[i];
			if (Y == p && s == 0) { // close
				L.removeFirst();
				C[i] = -1;
				Y = L.isEmpty() ? 0 : L.peekFirst();
			} else {
				L.addFirst(Y = p);
				C[i] = 1;
			}
		}

		if (Y != 0)
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.io.*;
import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = reverse(sc.nextInts());
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);
		sc = null;

		int [] C = new int [N];
		for (int i : rep(T))
			C[N - Q[i]] = 1;

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : rep(N)) {
			int p = P[i], s = C[i];
			if (!L.isEmpty() && L.peekFirst() == p && s == 0) { // close
				L.removeFirst();
				C[i] = -1;
			} else {
				L.addFirst(p);
				C[i] = 1;
			}
		}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			readToken();
			return new String(b, T[0], T[1] - T[0]);
		}

		public char nextChar() {
			readToken();
			return (char)b[T[0]];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			readToken();
			return calc(T[0], T[1]);
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			readLine();
			return new String(b, T[0], T[1] - T[0]);
		}

		public String [] next(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = next();
			return res;
		}

		public Integer [] nextInt(int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextInt();
			return res;
		}

		public Long [] nextLong(int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLong();
			return res;
		}

		public Double [] nextDouble(int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextDouble();
			return res;
		}

		public String [] nextLine(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLine();
			return res;
		}

		public String [] nextStrings() {
			readLine();
			int s = T[0], c = 0;
			String [] res = new String[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = new String(b, s, i - s);
					s = i+1;
				}
			res[c] = new String (b, s, T[1] - s);
			return res;
		}

		public char [] nextChars() {
			readToken();
			int c = 0;
			char [] res = new char[T[1] - T[0]];
			for (int i = T[0]; i < T[1]; ++i)
				res[c++] = (char)b[i];
			return res;
		}

		public Integer [] nextInts() {
			readLine();
			int s = T[0], c = 0;
			Integer [] res = new Integer[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = (int)calc(s, i);
					s = i+1;
				}
			res[c] = (int)calc(s, T[1]);
			return res;
		}

		public Long [] nextLongs() {
			readLine();
			int s = T[0], c = 0;
			Long [] res = new Long[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = calc(s, i);
					s = i+1;
				}
			res[c] = calc(s, T[1]);
			return res;
		}

		public Double [] nextDoubles() {
			readLine();
			int s = T[0], c = 0;
			Double [] res = new Double[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = Double.parseDouble(new String(b, s, i - s));
					s = i+1;
				}
			res[c] = Double.parseDouble(new String(b, s, T[1] - s));
			return res;
		}

		String [][] nextStrings(int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextStrings();
			return res;
		}

		char [][] nextChars(int N) {
			char [][] res = new char [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextChars();
			return res;
		}

		Integer [][] nextInts(int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextInts();
			return res;
		}

		Long [][] nextLongs(int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextLongs();
			return res;
		}

		Double [][] nextDoubles(int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private final static int MAX_SZ = (1 << 26);
		private final byte [] b = new byte[MAX_SZ];
		private final int [] T = new int [2];
		private int cur = 0;

		MyScanner () {
			try {
				InputStream is = new BufferedInputStream(System.in);
				while (is.available() == 0)
					Thread.sleep(1);
				start();
				int off = 0, c;
				while ((c = is.read(b, off, MAX_SZ - off)) != -1)
					off += c;
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private void readLine() {
			int c;
			for (c = cur; b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == LF || b[cur] == CR; ++cur);
		}

		private void readToken() {
			int c;
			for (c = cur; b[c] != SPACE && b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == SPACE || b[cur] == LF || b[cur] == CR; ++cur);
		}

		private int count(int s, int e) {
			int cnt = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == SPACE)
					++cnt;
			return cnt;
		}

		private long calc(int s, int e) {
			long res = 0, f = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == '-')
					f = -1;
				else
					res = 10 * res + b[i] - '0';
			return res * f;
		}

		private static final char LF = '\n';
		private static final char CR = '\r';
		private static final char SPACE = ' ';
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.io.*;
import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = reverse(sc.nextInts());
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);
		sc = null;

		int [] C = new int [N];
		for (int i : rep(T))
			C[N - Q[i]] = 1;

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : rep(N)) {
			int p = P[i], s = C[i];
			if (!L.isEmpty() && L.peekFirst() == p && s == 0) { // close
				L.removeFirst();
				C[i] = -1;
			} else {
				L.addFirst(p);
				C[i] = 1;
			}
		}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			readToken();
			return new String(b, T[0], T[1] - T[0]);
		}

		public char nextChar() {
			readToken();
			return (char)b[T[0]];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			readToken();
			return calc(T[0], T[1]);
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			readLine();
			return new String(b, T[0], T[1] - T[0]);
		}

		public String [] next(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = next();
			return res;
		}

		public Integer [] nextInt(int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextInt();
			return res;
		}

		public Long [] nextLong(int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLong();
			return res;
		}

		public Double [] nextDouble(int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextDouble();
			return res;
		}

		public String [] nextLine(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLine();
			return res;
		}

		public String [] nextStrings() {
			readLine();
			int s = T[0], c = 0;
			String [] res = new String[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = new String(b, s, i - s);
					s = i+1;
				}
			res[c] = new String (b, s, T[1] - s);
			return res;
		}

		public char [] nextChars() {
			readToken();
			int c = 0;
			char [] res = new char[T[1] - T[0]];
			for (int i = T[0]; i < T[1]; ++i)
				res[c++] = (char)b[i];
			return res;
		}

		public Integer [] nextInts() {
			readLine();
			int s = T[0], c = 0;
			Integer [] res = new Integer[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = (int)calc(s, i);
					s = i+1;
				}
			res[c] = (int)calc(s, T[1]);
			return res;
		}

		public Long [] nextLongs() {
			readLine();
			int s = T[0], c = 0;
			Long [] res = new Long[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = calc(s, i);
					s = i+1;
				}
			res[c] = calc(s, T[1]);
			return res;
		}

		public Double [] nextDoubles() {
			readLine();
			int s = T[0], c = 0;
			Double [] res = new Double[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = Double.parseDouble(new String(b, s, i - s));
					s = i+1;
				}
			res[c] = Double.parseDouble(new String(b, s, T[1] - s));
			return res;
		}

		String [][] nextStrings(int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextStrings();
			return res;
		}

		char [][] nextChars(int N) {
			char [][] res = new char [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextChars();
			return res;
		}

		Integer [][] nextInts(int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextInts();
			return res;
		}

		Long [][] nextLongs(int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextLongs();
			return res;
		}

		Double [][] nextDoubles(int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private final static int MAX_SZ = 50000000;
		private final byte [] b = new byte[MAX_SZ];
		private final int [] T = new int [2];
		private int cur = 0;

		MyScanner () {
			try {
				InputStream is = new BufferedInputStream(System.in);
				while (is.available() == 0)
					Thread.sleep(1);
				start();
				int off = 0, c;
				while ((c = is.read(b, off, MAX_SZ - off)) != -1)
					off += c;
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private void readLine() {
			int c;
			for (c = cur; b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == LF || b[cur] == CR; ++cur);
		}

		private void readToken() {
			int c;
			for (c = cur; b[c] != SPACE && b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == SPACE || b[cur] == LF || b[cur] == CR; ++cur);
		}

		private int count(int s, int e) {
			int cnt = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == SPACE)
					++cnt;
			return cnt;
		}

		private long calc(int s, int e) {
			long res = 0, f = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == '-')
					f = -1;
				else
					res = 10 * res + b[i] - '0';
			return res * f;
		}

		private static final char LF = '\n';
		private static final char CR = '\r';
		private static final char SPACE = ' ';
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.*;
import java.util.*;

public class cf286c {
  public static void main(String[] args) {
    FastIO in = new FastIO(), out = in;
    int n = in.nextInt();
    if(n%2 == 1) {
      out.println("NO");
      out.close();
      return;
    }
    int[] v = new int[n];
    for(int i=0; i<n; i++) v[i] = in.nextInt();
    int m = in.nextInt();
    for(int i=0; i<m; i++)
      v[in.nextInt()-1] *= -1;
    Stack<Pair<Integer,Integer>> stk1 = new Stack<>();
    Stack<Pair<Integer,Integer>> stk2 = new Stack<>();
    boolean fail = false;
    for(int i=0; i<n; i++) {
      if(v[i] > 0) stk1.add(new Pair<Integer,Integer>(v[i],i));
      else stk2.add(new Pair<Integer,Integer>(v[i],i));
      while(stk2.size() != 0 || (i==n-1 && stk1.size() != 0)) {
        if(stk1.size() == 0) {
          fail = true;
          break;
        }
        if(stk2.size() > 0 && stk1.peek().first == -stk2.peek().first) {
          stk1.pop();
          stk2.pop();
        }
        else {
          Pair<Integer,Integer> p = stk1.pop();
          p.first *= -1;
          v[p.second] = p.first;
          stk2.push(p);
        }
      }
    }
    if(fail) out.println("NO");
    else {
      out.println("YES");
      for(int x : v) out.print(x+ " ");
    }
    out.close();
  }
  static class Pair<T1,T2> {
    T1 first;
    T2 second;
    Pair(T1 a, T2 b) {
      first = a; second = b;
    }
    public String toString() {
      return first + ":" + second;
    }
  }

  static class FastIO extends PrintWriter {
    BufferedReader br;
    StringTokenizer st;

    public FastIO() {
      this(System.in, System.out);
    }

    public FastIO(InputStream in, OutputStream out) {
      super(new BufferedWriter(new OutputStreamWriter(out)));
      br = new BufferedReader(new InputStreamReader(in));
      scanLine();
    }

    public void scanLine() {
      try {
        st = new StringTokenizer(br.readLine().trim());
      } catch (Exception e) {
        throw new RuntimeException(e.getMessage());
      }
    }

    public int numTokens() {
      if (!st.hasMoreTokens()) {
        scanLine();
        return numTokens();
      }
      return st.countTokens();
    }

    public String next() {
      if (!st.hasMoreTokens()) {
        scanLine();
        return next();
      }
      return st.nextToken();
    }

    public double nextDouble() {
      return Double.parseDouble(next());
    }

    public long nextLong() {
      return Long.parseLong(next());
    }

    public int nextInt() {
      return Integer.parseInt(next());
    }
  }
}

import java.io.*;
import java.math.*;
import static java.lang.Math.*;
import java.security.SecureRandom;
import static java.util.Arrays.*;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import sun.misc.Regexp;
import java.awt.geom.*;
import sun.net.www.content.text.plain;

public class Main {

    public static void main(String[] args) throws IOException {
        new Main().run();
    }
    StreamTokenizer in;
    PrintWriter out;
//deb////////////////////////////////////////////////

    public static void deb(String n, Object n1) {
        System.out.println(n + " is : " + n1);
    }

    public static void deb(int[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(boolean[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(double[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(String[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(int[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }

    public static void deb(double[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }

    public static void deb(long[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }

    public static void deb(String[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }
    /////////////////////////////////////////////////////////////

    int nextInt() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }

    long nextLong() throws IOException {
        in.nextToken();
        return (long) in.nval;
    }

    void run() throws IOException {
//          in = new StreamTokenizer(new BufferedReader(new FileReader("input.txt")));
        // out = new PrintWriter(new FileWriter("output.txt"));
        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        solve();
        out.flush();
    }

    @SuppressWarnings("unchecked")
    void solve() throws IOException {
        //   BufferedReader re= new BufferedReader(new FileReader("C:\\Users\\ASELA\\Desktop\\PROBLEMSET\\input\\F\\10.in"));
        //   BufferedReader re= new BufferedReader(new InputStreamReader(System.in));
        int n = nextInt();
        int[] A = new int[n];
        for (int i = 0; i < n; i++) {
            A[i] = nextInt();
        }
        int k = nextInt();
        for (int i = 0; i < k; i++) {
            int tt = nextInt();
            A[tt - 1] = -A[tt - 1];
        }
        Stack<Integer> st = new Stack<Integer>();
        Stack<Integer> pos = new Stack<Integer>();
        for (int i = n-1; i >=0 ; i--) {
            if (!st.empty()) {
                if (A[i]>0) {
                    if(-A[i]==st.peek())
                    { st.pop();pos.pop();}
                    else if(A[i]==st.peek()){
                    st.pop();
                    A[pos.peek()]=-A[pos.peek()];
                    pos.pop();
                    }
                    else {
                    st.push(A[i]);
                    pos.push(i);
                }

                }  else {
                    st.push(A[i]);
                    pos.push(i);
                }
            } else {
                st.push(A[i]);
                pos.push(i);
            }
        }
        if (!st.empty())
        {
         System.out.println("NO");
         return;
        }
        else
        {
            out.println("YES");
            for (int i = 0; i < n; i++) {
                out.print(A[i] + " ");
            }
            out.println("");
        }

    }
}

import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

	public void randomShuffle (int n, int a []) {
		Random rnd = new Random();
		for (int i = 1; i < n; i++) {
			int j = rnd.nextInt(i + 1);
			int t = a[j];
			a[j] = a[i];
			a[i] = t;
		}
	}

	int n, N;
	int [] p, ps, mapping, count;

	public void solve() throws Throwable {
		n = sc.nextInt();
		p = new int [n];
		ps = new int [n];
		mapping = new int [n];
		count = new int [n];

		int negativeCount = 0;

		for (int i = 0; i < n; i++) {
			p[i] = sc.nextInt();
			ps[i] = p[i];
		}

		randomShuffle(n, ps);
		Arrays.sort(ps);
		N = 0;
		int pre = -1;
		for (int i = 0; i < n; i++) {
			if (ps[i] != pre) {
				if (pre != -1) {
					if (count[N - 1] % 2 != 0) {
						out.println("NO");
						return;
					} else {
						negativeCount += count[N - 1] / 2;
						count[N - 1] /= 2;
					}
				}
				N++;
				count[N - 1]++;
				mapping[N - 1] = ps[i];
				pre = ps[i];
			} else {
				count[N - 1]++;
				pre = ps[i];
			}
		}

		if (count[N - 1] % 2 != 0) {
			out.println("NO");
			return;
		} else {
			negativeCount += count[N - 1] / 2;
			count[N - 1] /= 2;
		}

		int m = sc.nextInt();
		if (m > negativeCount) {
			out.println("NO");
			return;
		}

		int stack [] = new int [n];
		boolean neg [] = new boolean [n];
		for (int i = 0; i < m; i++) {
			int pos = sc.nextInt() - 1;
			neg[pos] = true;
		}
		int stackSize = 0;

		int stackBrackets[] = new int [n];

		for (int i = 0; i < n; i++) {
			if (neg[i]) {
				if (stackSize == 0) {
					out.println("NO");
					return;
				}
				int sSize = 0;
				stackBrackets[sSize++] = i;
				for (int j = stackSize - 1; j >= 0; j--) {
					int pos = stack[j];
					if (p[pos] == p[stackBrackets[sSize - 1]]) {
						p[stackBrackets[sSize - 1]] = -p[stackBrackets[sSize - 1]];
						sSize--;
					} else {
						stackBrackets[sSize++] = pos;
					}
					if (sSize == 0) {
						stackSize = j;
						break;
					}
				}
				if (sSize > 0) {
					out.println("NO");
					return;
				}
			} else {
				stack[stackSize++] = i;
			}
		}

		if (stackSize > 0) {
			int sSize = 0;
			for (int j = stackSize - 1; j >= 0; j--) {
				int pos = stack[j];
				if (sSize == 0) {
					stackBrackets[sSize++] = pos;
				} else {
					if (p[pos] == p[stackBrackets[sSize - 1]]) {
						p[stackBrackets[sSize - 1]] = -p[stackBrackets[sSize - 1]];
						sSize--;
					} else {
						stackBrackets[sSize++] = pos;
					}
				}
			}
			if (sSize > 0) {
				out.println("NO");
				return;
			}
		}

		out.println("YES");
		for (int i = 0; i < n; i++) {
			out.print(p[i]+" ");
		}
		out.println();

	}

	BufferedReader in;
	PrintWriter out;
	FastScanner sc;

	static Throwable uncaught;

	@Override
	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			sc = new FastScanner(in);
			solve();
		} catch (Throwable t) {
			Solution.uncaught = t;
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) throws Throwable {
		Thread t = new Thread(null, new Solution(), "", (1 << 26));
		t.start();
		t.join();
		if (uncaught != null) {
			throw uncaught;
		}
	}

}

class FastScanner {

	BufferedReader reader;
	StringTokenizer strTok;

	public FastScanner(BufferedReader reader) {
		this.reader = reader;
	}

	public String nextToken() throws IOException {
		while (strTok == null || !strTok.hasMoreTokens()) {
			strTok = new StringTokenizer(reader.readLine().trim());
		}
		return strTok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

}

import java.io.*;
import java.util.*;
import java.math.*;

public class Main {
	public static void main(String[] args) {
		new Main().run();
	}
	void run() {
		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = in.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; ++i)
			a[i] = in.nextInt();
		int m = in.nextInt();
		for (int i = 0; i < m; ++i) {
			int v = in.nextInt();
			a[v - 1] = -a[v - 1];
		}

		int[] stack = new int[n];
		int top = 0;
		for (int i = n - 1; i >= 0; --i) {
			if (a[i] < 0) {
				stack[top++] = -a[i];
			}
			else {
				if (top == 0 || stack[top - 1] != a[i]) {
					stack[top++] = a[i];
					a[i] = -a[i];
				}
				else {
					--top;
				}
			}
		}

		if (top > 0) {
			out.println("NO");
		}
		else {
			out.println("YES");
			for (int i = 0; i < n; ++i)
				out.print(a[i] + " ");
			out.println();
		}
		out.close();
	}
}

class InputReader {
	BufferedReader buff;
	StringTokenizer tokenizer;

	InputReader(InputStream stream) {
		buff = new BufferedReader(new InputStreamReader(stream));
		tokenizer = null;
	}
	boolean hasNext() {
		while (tokenizer == null || !tokenizer.hasMoreTokens())
			try {
				tokenizer = new StringTokenizer(buff.readLine());
			}
			catch (Exception e) {
				return false;
			}
		return true;
	}
	String next() {
		if (!hasNext())
			throw new RuntimeException();
		return tokenizer.nextToken();
	}
	int nextInt() { return Integer.parseInt(next()); }
	long nextLong() { return Long.parseLong(next()); }
}

import java.io.*;
import java.math.*;
import java.util.*;

public class Solution {
    public void run() {
        try {
            int n = reader.nextInt();
            int[] type = new int[n];
            for (int i = 0; i < n; ++ i) {
                type[i] = reader.nextInt();
            }
            boolean[] negative = new boolean[n];
            int t = reader.nextInt();
            for (int i = 0; i < t; ++ i) {
                negative[reader.nextInt() - 1] = true;
            }
            Stack <Integer> stack = new Stack <Integer>();
            for (int i = n - 1; i >= 0; -- i) {
                if (negative[i]) {
                    stack.push(type[i]);
                    type[i] *= -1;
                } else if (!stack.isEmpty() && type[i] == stack.peek()) {
                    stack.pop();
                } else {
                    stack.push(type[i]);
                    type[i] *= -1;
                }
            }
            if (stack.isEmpty()) {
                writer.println("YES");
                for (int i = 0; i < n; ++ i) {
                    writer.print(type[i] + " ");
                }
                writer.println();
            } else {
                writer.println("NO");
            }
        } catch (IOException ex) {
        }
        writer.close();
    }

    InputReader reader;
    PrintWriter writer;

    Solution() {
        reader = new InputReader();
        writer = new PrintWriter(System.out);
    }

    public static void main(String[] args) {
        new Solution().run();
    }

}

class InputReader {
    BufferedReader reader;
    StringTokenizer tokenizer;

    InputReader() {
        reader = new BufferedReader(new InputStreamReader(System.in));
        tokenizer = new StringTokenizer("");
    }

    String next() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    Integer nextInt() throws IOException {
        return Integer.parseInt(next());
    }
}

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.io.Writer;
import java.math.BigInteger;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Egor Kulikov (egor@egork.net)
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
		int count = in.readInt();
		int[] sequence = IOUtils.readIntArray(in, count);
		int closingCount = in.readInt();
		for (int i = 0; i < closingCount; i++)
			sequence[in.readInt() - 1] *= -1;
		int[] primaryStack = new int[count];
		int sizePrimary = 0;
		int[] secondaryStack = new int[count];
		int sizeSecondary = 0;
		for (int i = 0; i < sequence.length; i++) {
			if (sequence[i] > 0)
				primaryStack[sizePrimary++] = i;
			else {
				while (sizePrimary > 0 && !(sequence[primaryStack[sizePrimary - 1]] == -sequence[i] && sizeSecondary == 0)) {
					if (sizeSecondary > 0 && sequence[secondaryStack[sizeSecondary - 1]] == sequence[primaryStack[sizePrimary - 1]]) {
						sequence[secondaryStack[--sizeSecondary]] *= -1;
						sizePrimary--;
					} else
						secondaryStack[sizeSecondary++] = primaryStack[--sizePrimary];
				}
				if (sizePrimary == 0) {
					out.printLine("NO");
					return;
				}
				sizePrimary--;
			}
		}
		while (sizePrimary > 0) {
			if (sizeSecondary > 0 && sequence[secondaryStack[sizeSecondary - 1]] == sequence[primaryStack[sizePrimary - 1]]) {
				sequence[secondaryStack[--sizeSecondary]] *= -1;
				sizePrimary--;
			} else
				secondaryStack[sizeSecondary++] = primaryStack[--sizePrimary];
		}
		if (sizeSecondary != 0) {
			out.printLine("NO");
			return;
		}
		out.printLine("YES");
		out.printLine(sequence);
    }
}

class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return isWhitespace(c);
	}

	public static boolean isWhitespace(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

    public void print(int[] array) {
        for (int i = 0; i < array.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(array[i]);
        }
    }

    public void printLine(int[] array) {
        print(array);
        writer.println();
    }

    public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}

	}

class IOUtils {

	public static int[] readIntArray(InputReader in, int size) {
		int[] array = new int[size];
		for (int i = 0; i < size; i++)
			array[i] = in.readInt();
		return array;
	}

	}

import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.Writer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Niyaz Nigmatullin
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		FastScanner in = new FastScanner(inputStream);
		FastPrinter out = new FastPrinter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, FastScanner in, FastPrinter out) {
        int n = in.nextInt();
        int[] p = in.readIntArray(n);
        int m = in.nextInt();
        boolean[] neg = new boolean[n];
        for (int i : in.readIntArray(m)) {
            neg[i - 1] = true;
        }
        boolean[] ans = neg.clone();
        int[] stack = new int[n];
        int cnt = 0;
        Arrays.fill(ans, true);
        for (int i = n - 1; i >= 0; i--) {
            if (neg[i]) {
                stack[cnt++] = p[i];
            } else {
                if (cnt > 0 && stack[cnt - 1] == p[i]) {
                    ans[i] = false;
                    --cnt;
                } else {
                    stack[cnt++] = p[i];
                }
            }
        }
        if (cnt > 0) {
            out.println("NO");
            return;
        }
        out.println("YES");
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            if (i > 0) sb.append(' ');
            if (ans[i]) {
                sb.append(-p[i]);
            } else {
                sb.append(p[i]);
            }
        }
        out.println(sb);
    }
}

class FastScanner extends BufferedReader {

    boolean isEOF;

    public FastScanner(InputStream is) {
        super(new InputStreamReader(is));
    }

    public int read() {
        try {
            int ret = super.read();
            if (isEOF && ret < 0) {
                throw new InputMismatchException();
            }
            isEOF = ret == -1;
            return ret;
        } catch (IOException e) {
            throw new InputMismatchException();
        }
    }

    static boolean isWhiteSpace(int c) {
        return c >= 0 && c <= 32;
    }

    public int nextInt() {
        int c = read();
        while (isWhiteSpace(c)) {
            c = read();
        }
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int ret = 0;
        while (c >= 0 && !isWhiteSpace(c)) {
            if (c < '0' || c > '9') {
                throw new NumberFormatException("digit expected " + (char) c
                        + " found");
            }
            ret = ret * 10 + c - '0';
            c = read();
        }
        return ret * sgn;
    }

    public int[] readIntArray(int n) {
        int[] ret = new int[n];
        for (int i = 0; i < n; i++) {
            ret[i] = nextInt();
        }
        return ret;
    }

    }

class FastPrinter extends PrintWriter {

    public FastPrinter(OutputStream out) {
        super(out);
    }

    public FastPrinter(Writer out) {
        super(out);
    }

}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.SortedSet;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * #
 * @author pttrung
 */
public class C_Round_176_Div1 {

    public static long MOD = 1000000007;

    public static void main(String[] args) throws FileNotFoundException {
        // PrintWriter out = new PrintWriter(new FileOutputStream(new File(
        // "output.txt")));
        PrintWriter out = new PrintWriter(System.out);
        Scanner in = new Scanner();
        int n = in.nextInt();
        int[] data = new int[n];

        for (int i = 0; i < n; i++) {
            data[i] = in.nextInt();

        }

        int q = in.nextInt();
        int[] pos = new int[q];
        for (int i = 0; i < q; i++) {
            pos[i] = in.nextInt() - 1;
            data[pos[i]] *= -1;
        }
        Stack<Integer> s = new Stack();
        for (int i = n - 1; i >= 0; i--) {
            if(data[i] < 0){
                s.add(data[i]);
            }else{
                if(!s.isEmpty() && s.peek() == -data[i]){
                    s.pop();
                }else{
                    data[i] = -data[i];
                    s.add(data[i]);
                }
            }
        }
        if(!s.isEmpty()){
            out.println("NO");
        }else{
            out.println("YES");
            for(int i : data){
                out.print(i + " ");
            }
        }
        out.close();
    }

    public static boolean process(int cur, int l, int r, int[] data, TreeSet<Integer>[] tree) {
        if (l > r) {
            return true;
        }
        if ((r - l + 1) % 2 != 0) {
            return false;
        }
        int start = l;
        while (true) {
            Integer i = tree[cur].ceiling(start);
            if (i != null && i <= r) {
                if (data[i] != data[start]) {
                    return false;
                }
                data[i] = -data[i];

                boolean v = process(cur + 1, start + 1, i - 1, data, tree);
                if (!v) {
                    return false;
                }

                start = i + 1;
            } else {
                break;
            }

        }

        return start == r + 1;
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            if (this.y != other.y) {
                return false;
            }
            return true;
        }

        @Override
        public int compareTo(Point o) {
            return x - o.x;
        }
    }

    public static class FT {

        long[] data;

        FT(int n) {
            data = new long[n];
        }

        public void update(int index, long value) {
            while (index < data.length) {
                data[index] += value;
                index += (index & (-index));
            }
        }

        public long get(int index) {
            long result = 0;
            while (index > 0) {
                result += data[index];
                index -= (index & (-index));
            }
            return result;

        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    static class Scanner {

        BufferedReader br;
        StringTokenizer st;

        public Scanner() throws FileNotFoundException {
            // System.setOut(new PrintStream(new BufferedOutputStream(System.out), true));
            br = new BufferedReader(new InputStreamReader(System.in));
            //  br = new BufferedReader(new InputStreamReader(new FileInputStream(new File("input.txt"))));
        }

        public String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        public boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }
    }
}

import java.io.*;
import java.util.*;

public class C {
	public static void main(String[] args) {
		new C().run();
	}

	BufferedReader br;
	StringTokenizer in;
	PrintWriter out;

	public String nextToken() throws IOException {
		while (in == null || !in.hasMoreTokens()) {
			in = new StringTokenizer(br.readLine());
		}
		return in.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public void solve() throws IOException {
		int n = nextInt();

		if (n % 2 != 0) {
			out.println("NO");
			return;
		}

		int[] p = new int[n];
		for (int i = 0; i < n; i++) {
			p[i] = nextInt();
		}

		int m = nextInt();
		if (m > n / 2) {
			out.println("NO");
			return;
		}

		for (int i = 0; i < m; i++) {
			p[nextInt() - 1] *= -1;
		}

		Stack<Integer> stack = new Stack<>();

		for (int i = p.length - 1; i >= 0; i--) {
			if (p[i] < 0) {
				stack.add(-p[i]);
			} else {
				if (stack.size() > 0 && stack.peek() == p[i]) {
					stack.pop();
				} else {
					stack.add(p[i]);
					p[i] = -p[i];
				}
			}
		}

		if (stack.size() != 0) {
			out.println("NO");
			return;
		}

		out.println("YES");
		for (int i = 0; i < n; i++) {
			out.print(p[i] + " ");
		}
	}

	public void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

public class C {
	static InputStreamReader isr = new InputStreamReader(System.in);
	static BufferedReader br = new BufferedReader(isr);

	static int[] readIntArray() throws IOException {
		String[] v = br.readLine().split(" ");
		int[] ans = new int[v.length];

		for (int i = 0; i < ans.length; i++) {
			ans[i] = Integer.valueOf(v[i]);
		}

		return ans;
	}

	static int N;
	static int[] p;
	static int[] t;
	static int T;

	public static void main(String[] args) throws IOException {
		long start = System.currentTimeMillis();

		N = readIntArray()[0];
		p = readIntArray();
		int[] tt = readIntArray();
		T = tt[0];

		int[] stack = new int[N + 1];
		int top = -1;
		for (int i = 0; i < p.length; i++) {
			if (top == -1) {
				stack[++top] = p[i];
			} else {
				if (stack[top] == p[i]) {
					top--;
				} else {
					stack[++top] = p[i];
				}
			}
		}

		if (top != -1) {
			System.out.println("NO");
			return;
		}

		for (int i = 1; i < tt.length; i++) {
			p[tt[i]-1] *= -1;
		}

		int[] ans = new int[N];
		top = -1;
		for (int i = p.length - 1; i >= 0; i--) {
			if (p[i] < 0) {
				stack[++top] = p[i];
				ans[i] = p[i];
			} else {
				if (top == -1) {
					stack[++top] = -p[i];
					ans[i] = - p[i];
				} else if (stack[top] == -p[i]) {
					ans[i] = p[i];
					top--;
				} else {
					stack[++top] = -p[i];
					ans[i] = - p[i];
				}
			}
		}

		if (top != -1) {
			System.out.println("NO");
			return;
		}

		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < ans.length; i++) {
			if ( sb.length() > 0)
			{
				sb.append(" ");
			}

			sb.append(ans[i]);
		}

		System.out.println("YES");
		System.out.println(sb.toString());
//		System.out.println(System.currentTimeMillis() - start);
	}

	private static int get(HashMap<Integer, Integer> opened, int abs) {
		if (!opened.containsKey(abs)) {
			opened.put(abs, 0);
			return 0;
		} else {
			return opened.get(abs);
		}
	}

	private static void dec(HashMap<Integer, Integer> opened, int abs) {
		opened.put(abs, opened.get(abs) - 1);
	}

	private static void inc(HashMap<Integer, Integer> opened, int abs) {
		if (!opened.containsKey(abs)) {
			opened.put(abs, 1);
		} else {
			opened.put(abs, opened.get(abs) + 1);
		}
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Deque;
import java.util.LinkedList;
import java.util.StringTokenizer;

public class C implements Runnable {

    private void solve() throws Exception {
        int n = nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }
        int t = nextInt();
        for (int i = 0; i < t; i++) {
            int q = nextInt() - 1;
            a[q] = -a[q];
        }
        Deque<Integer> stack = new LinkedList<>();
        for (int i = n - 1; i >= 0; i--) {
            if (a[i] < 0) {
                stack.addLast(-a[i]);
            } else {
                if (!stack.isEmpty() && stack.peekLast() == a[i]) {
                    stack.removeLast();
                } else {
                    stack.addLast(a[i]);
                    a[i] = -a[i];
                }
            }
        }
        if (stack.isEmpty()) {
            out.println("YES");
            for (int x : a) {
                out.print(x);
                out.print(' ');
            }
        } else {
            out.println("NO");
        }
    }

    private BufferedReader in;
    private StringTokenizer tokenizer = new StringTokenizer("");
    private PrintWriter out;

    private String nextToken() throws IOException {
        while (!tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(in.readLine());
        }
        return tokenizer.nextToken();
    }

    private int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    private long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    @Override
    public void run() {
        try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
             PrintWriter out = new PrintWriter(System.out))
        {
            this.in = in;
            this.out = out;
            solve();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        new Thread(new C()).start();
    }
}

import static java.util.Arrays.binarySearch;
import static java.util.Arrays.deepToString;
import static java.util.Arrays.sort;

import java.io.*;
import java.math.*;
import java.util.*;

public class C {

	static void solve() {
		int n = nextInt();
		int[] p = new int[n];
		int[] who = new int[n];
		for (int i = 0; i < n; i++) {
			p[i] = nextInt();
		}
		boolean[] negative = new boolean[n];
		int t = nextInt();
		for (int i = 0; i < t; i++) {
			negative[nextInt() - 1] = true;
		}
		int[] stack = new int[n];
		int size = 0;
		for (int i = n - 1; i >= 0; i--) {
			if (negative[i] || size == 0 || stack[size - 1] != p[i]) {
				negative[i] = true;
				stack[size++] = p[i];
			} else {
				size--;
			}
		}
		if (size == 0) {
			writer.println("YES");
			for (int i = 0; i < n; i++) {
				writer.print((negative[i] ? -p[i] : p[i]) + " ");
			}
		} else {
			writer.println("NO");
		}
	}

	public static void main(String[] args) throws Exception {
		reader = new BufferedReader(new InputStreamReader(System.in));
		writer = new PrintWriter(System.out);
		Locale.setDefault(Locale.US);

		setTime();
		solve();
		printTime();
		printMemory();

		writer.close();
	}

	static BufferedReader reader;
	static PrintWriter writer;
	static StringTokenizer tok = new StringTokenizer("");
	static long systemTime;

	static void debug(Object... o) {
		System.err.println(deepToString(o));
	}

	static void setTime() {
		systemTime = System.currentTimeMillis();
	}

	static void printTime() {
		System.err.println("Time consumed: " + (System.currentTimeMillis() - systemTime));
	}

	static void printMemory() {
		System.err.println("Memory consumed: "
				+ (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1000 + "kb");
	}

	static String next() {
		while (!tok.hasMoreTokens()) {
			String w = null;
			try {
				w = reader.readLine();
			} catch (Exception e) {
				e.printStackTrace();
			}
			if (w == null)
				return null;
			tok = new StringTokenizer(w);
		}
		return tok.nextToken();
	}

	static int nextInt() {
		return Integer.parseInt(next());
	}

	static long nextLong() {
		return Long.parseLong(next());
	}

	static double nextDouble() {
		return Double.parseDouble(next());
	}

	static BigInteger nextBigInteger() {
		return new BigInteger(next());
	}
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Lokesh Khandelwal
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n=in.nextInt(),i;
        int a[]=new int[n];
        for(i=0;i<n;i++)
        {
            a[i]=in.nextInt();
        }
        boolean seq[]=new boolean[n];
        Arrays.fill(seq,true);
        int t=in.nextInt();
        boolean neg[]=new boolean[n];
        for(i=0;i<t;i++)
            neg[in.nextInt()-1]=true;
        int index=0;
        int stack[]=new int[n];
        for(i=n-1;i>=0;i--)
        {
            if(neg[i])
                stack[index++]=a[i];
            else
            {
                if(index>0&&stack[index-1]==a[i])
                {
                    seq[i]=false;
                    index--;
                }
                else stack[index++]=a[i];
            }
        }
        for(i=0;i<n;i++)
        {
            if(seq[i])
                a[i]*=-1;
        }
        if(index!=0)
        {
            out.printLine("NO");
        }
        else
        {
            out.printLine("YES");
            for(i=0;i<n-1;i++)
                out.print(a[i]+" ");
            out.printLine(a[i]);
        }
    }
}

class InputReader
{
    BufferedReader in;
    StringTokenizer tokenizer=null;

    public InputReader(InputStream inputStream)
    {
        in=new BufferedReader(new InputStreamReader(inputStream));
    }
    public String next()
    {
        try{
            while (tokenizer==null||!tokenizer.hasMoreTokens())
            {
                tokenizer=new StringTokenizer(in.readLine());
            }
            return tokenizer.nextToken();
        }
        catch (IOException e)
        {
            return null;
        }
    }
    public int nextInt()
    {
        return Integer.parseInt(next());
    }
    }

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		int [] P = new int [N];
		for (int i = N-1; i >= 0; --i)
			P[i] = sc.nextInt();
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		int [] C = new int [N];
		for (int i = 0; i < T; ++i)
			C[N - Q[i]] = 1;

		int [] K = new int [N]; int Z = 0;
		Map<Integer, Integer> Y = new HashMap<Integer, Integer>();
		for (int i = 0; i < N; ++i) {
			if (!Y.containsKey(P[i])) {
				Y.put(P[i], Z);
				K[Z] = P[i]; ++Z;
			}
			P[i] = Y.get(P[i]);
		}

		int [] W = new int [N], L = new int [N]; int M = -1;
		for (int i = 0; i < N; ++i) {
			int p = P[i], s = C[i], w = W[p];
			boolean close = M >= 0 && L[M] == p && s == 0 && w > 0;
			if (close) {
				--M;
				--W[p];
				C[i] = -1;
			} else {
				L[++M] = p;
				++W[p];
				C[i] = 1;
			}
		}

		if (M >= 0)
			exit("NO");

		print("YES");
		int [] res = new int [N];
		for (int i = 0; i < N; ++i)
			res[N-1-i] = -K[P[i]] * C[i];

		StringBuilder S = new StringBuilder(); S.append(res[0]);
		for (int i = 1; i < N; ++i)
			S.append(" " + res[i]);
		exit(S);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = reverse(sc.nextInts());
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		int [] C = new int [N];
		for (int i : rep(T))
			C[N - Q[i]] = 1;

		int [] L = new int [N]; int M = 0;
		for (int i : rep(N)) {
			int p = P[i], s = C[i];
			if (M > 0 && L[M-1] == p && s == 0) { // close
				--M;
				C[i] = -1;
			} else {
				L[M++] = p;
				C[i] = 1;
			}
		}

		if (M > 0)
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = reverse(sc.nextInts());
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		int [] C = new int [N];
		for (int i : rep(T))
			C[N - Q[i]] = 1;

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : rep(N)) {
			int p = P[i], s = C[i];
			if (!L.isEmpty() && L.peekFirst() == p && s == 0) {
				L.removeFirst();
				C[i] = -1;
			} else {
				L.addFirst(p);
				C[i] = 1;
			}
		}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.io.*;
import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = reverse(sc.nextInts());
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		int [] C = new int [N];
		for (int i : rep(T))
			C[N - Q[i]] = 1;

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : rep(N)) {
			int p = P[i], s = C[i];
			if (!L.isEmpty() && L.peekFirst() == p && s == 0) { // close
				L.removeFirst();
				C[i] = -1;
			} else {
				L.addFirst(p);
				C[i] = 1;
			}
		}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			readToken();
			return new String(b, T[0], T[1] - T[0]);
		}

		public char nextChar() {
			readToken();
			return (char)b[T[0]];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			readToken();
			return calc(T[0], T[1]);
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			readLine();
			return new String(b, T[0], T[1] - T[0]);
		}

		public String [] next(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = next();
			return res;
		}

		public Integer [] nextInt(int N) {
			Integer [] res = new Integer [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextInt();
			return res;
		}

		public Long [] nextLong(int N) {
			Long [] res = new Long [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLong();
			return res;
		}

		public Double [] nextDouble(int N) {
			Double [] res = new Double [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextDouble();
			return res;
		}

		public String [] nextLine(int N) {
			String [] res = new String [N];
			for (int i = 0; i < N; ++i)
				res[i] = nextLine();
			return res;
		}

		public String [] nextStrings() {
			readLine();
			int s = T[0], c = 0;
			String [] res = new String[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = new String(b, s, i - s);
					s = i+1;
				}
			res[c] = new String (b, s, T[1] - s);
			return res;
		}

		public char [] nextChars() {
			readToken();
			int c = 0;
			char [] res = new char[T[1] - T[0]];
			for (int i = T[0]; i < T[1]; ++i)
				res[c++] = (char)b[i];
			return res;
		}

		public Integer [] nextInts() {
			readLine();
			int s = T[0], c = 0;
			Integer [] res = new Integer[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = (int)calc(s, i);
					s = i+1;
				}
			res[c] = (int)calc(s, T[1]);
			return res;
		}

		public Long [] nextLongs() {
			readLine();
			int s = T[0], c = 0;
			Long [] res = new Long[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = calc(s, i);
					s = i+1;
				}
			res[c] = calc(s, T[1]);
			return res;
		}

		public Double [] nextDoubles() {
			readLine();
			int s = T[0], c = 0;
			Double [] res = new Double[count(T[0], T[1])];
			for (int i = T[0]; i < T[1]; ++i)
				if (b[i] == SPACE) {
					res[c++] = Double.parseDouble(new String(b, s, i - s));
					s = i+1;
				}
			res[c] = Double.parseDouble(new String(b, s, T[1] - s));
			return res;
		}

		String [][] nextStrings(int N) {
			String [][] res = new String [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextStrings();
			return res;
		}

		char [][] nextChars(int N) {
			char [][] res = new char [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextChars();
			return res;
		}

		Integer [][] nextInts(int N) {
			Integer [][] res = new Integer [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextInts();
			return res;
		}

		Long [][] nextLongs(int N) {
			Long [][] res = new Long [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextLongs();
			return res;
		}

		Double [][] nextDoubles(int N) {
			Double [][] res = new Double [N][];
			for (int i = 0; i < N; ++i)
				res[i] = nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private final static int MAX_SZ = (int)5e7;
		private final byte [] b = new byte[MAX_SZ];
		private final int [] T = new int [2];
		private int cur = 0;

		MyScanner () {
			try {
				InputStream is = new BufferedInputStream(System.in);
				while (is.available() == 0)
					Thread.sleep(1);
				start();
				int off = 0, c;
				while ((c = is.read(b, off, MAX_SZ - off)) != -1)
					off += c;
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private void readLine() {
			int c;
			for (c = cur; b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == LF || b[cur] == CR; ++cur);
		}

		private void readToken() {
			int c;
			for (c = cur; b[c] != SPACE && b[c] != LF && b[c] != CR && b[c] != 0; ++c);
			T[0] = cur; T[1] = c;
			for (cur = c; b[cur] == SPACE || b[cur] == LF || b[cur] == CR; ++cur);
		}

		private int count(int s, int e) {
			int cnt = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == SPACE)
					++cnt;
			return cnt;
		}

		private long calc(int s, int e) {
			long res = 0, f = 1;
			for (int i = s; i < e; ++i)
				if (b[i] == '-')
					f = -1;
				else
					res = 10 * res + b[i] - '0';
			return res * f;
		}

		private static final char LF = '\n';
		private static final char CR = '\r';
		private static final char SPACE = ' ';
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = reverse(sc.nextInts());
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		int [] C = new int [N];
		for (int i : rep(T))
			C[N - Q[i]] = 1;

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : rep(N)) {
			int p = P[i], s = C[i];
			if (!L.isEmpty() && L.peekFirst() == p && s == 0) { // close
				L.removeFirst();
				C[i] = -1;
			} else {
				L.addFirst(p);
				C[i] = 1;
			}
		}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		int [] P = new int [N];
		for (int i = N-1; i >= 0; --i)
			P[i] = sc.nextInt();
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		int [] C = new int [N];
		for (int i = 0; i < T; ++i)
			C[N - Q[i]] = 1;

		int [] K = new int [N]; int Z = 0;
		Map<Integer, Integer> Y = new HashMap<Integer, Integer>();
		for (int i = 0; i < N; ++i) {
			if (!Y.containsKey(P[i])) {
				Y.put(P[i], Z);
				K[Z] = P[i]; ++Z;
			}
			P[i] = Y.get(P[i]);
		}

		int [] W = new int [N], L = new int [N]; int M = -1;
		for (int i = 0; i < N; ++i) {
			int p = P[i], s = C[i], w = W[p];
			boolean close = M >= 0 && L[M] == p && s == 0 && w > 0;
			if (close) {
				--M;
				--W[p];
				C[i] = -1;
			} else {
				L[++M] = p;
				++W[p];
				C[i] = 1;
			}
		}

		if (M >= 0)
			exit("NO");

		print("YES");
		int [] res = new int [N];
		for (int i = 0; i < N; ++i)
			res[N-1-i] = -K[P[i]] * C[i];

		exit(res);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] res = sc.nextInts();
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		for (int i : rep(T))
			res[Q[i]-1] *= -1;

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : sep(N))
			if (!L.isEmpty() && L.peekFirst() + res[i] == 0)
				L.removeFirst();
			else {
				res[i] = -abs(res[i]);
				L.addFirst(res[i]);
			}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		exit(res);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.BufferedReader;
import java.util.Comparator;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.List;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.util.Collections;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author AlexFetisov
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt();
        int[] p = Utils.readIntArray(in, n);
        int am = in.nextInt();
        int[] q = Utils.readIntArray(in, am);

        ArrayUtils.reverse(p);
        boolean[] isOpen = new boolean[n];
        for (int i = 0; i < am; ++i) {
            isOpen[n - q[i]] = true;
        }
        Deque<Integer> stack = new ArrayDeque<Integer>();
        List<Integer> res = new ArrayList<Integer>();

        for (int i = 0; i < n; ++i) {
            if (isOpen[i]) {
                stack.add(p[i]);
                res.add(p[i]);
            } else if (stack.isEmpty()) {
                stack.add(p[i]);
                res.add(p[i]);
            } else if (stack.getLast() != p[i]) {
                stack.add(p[i]);
                res.add(p[i]);
            } else {
                stack.removeLast();
                res.add(-p[i]);
            }
        }
        if (stack.isEmpty()) {
            out.println("YES");
            Collections.reverse(res);
            for (int i = 0; i < res.size(); ++i) {
                res.set(i, -res.get(i));
            }
            out.println(ArrayUtils.toString(res));
            return;
        }
        out.println("NO");
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer stt;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
    }

    public String nextLine() {
        try {
            return reader.readLine();
        } catch (IOException e) {
            return null;
        }
    }

    public String nextString() {
        while (stt == null || !stt.hasMoreTokens()) {
            stt = new StringTokenizer(nextLine());
        }
        return stt.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

}

class Utils {
    public static int[] readIntArray(InputReader in, int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; ++i) {
            a[i] = in.nextInt();
        }
        return a;
    }

}

class ArrayUtils {

    public static String toString(Collection<Integer> collection) {
        StringBuilder result = new StringBuilder("");
        for (int x : collection) {
            result.append(x).append(" ");
        }
        return result.substring(0, result.length()-1);
    }

    public static void reverse(int[] order) {
        for (int i = 0, j = order.length-1; i < j; ++i, --j) {
            int t = order[i];
            order[i] = order[j];
            order[j] = t;
        }
    }

}

//package practice.E;

import java.io.*;
import java.util.Stack;
import java.util.StringTokenizer;

public class CF286C {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);

        int n = sc.nextInt();
        int[] p = new int[n];
        for (int i = 0; i < p.length; i++)
            p[i] = sc.nextInt();

        int[] sign = new int[n];
        int t = sc.nextInt();
        for (int i = 0; i < t; i++)
            sign[sc.nextInt()-1] = -1;

        Stack<int[]> pos = new Stack<>();
        Stack<int[]> neg = new Stack<>();

        for (int i = 0; i < n; i++) {
            int[] elem = new int[]{p[i], i};
            if(sign[i] == -1){
                neg.push(elem);
                while(!pos.isEmpty() && !neg.isEmpty()){
                    int[] e = pos.pop();
                    if(e[0] == neg.peek()[0]){
                        sign[e[1]] = 1;
                        neg.pop();
                    }else{
                        sign[e[1]] = -1;
                        neg.push(e);
                    }
                }
                if(!neg.isEmpty()){
                    System.out.println("NO");
                    return;
                }
            }else{
                pos.add(elem);
            }
        }

        while(!pos.isEmpty()){
            neg.add(pos.pop());
            sign[neg.peek()[1]] = -1;
            while(!pos.isEmpty() && !neg.isEmpty()){
                int[] e = pos.pop();
                if(e[0] == neg.peek()[0]){
                    sign[e[1]] = 1;
                    neg.pop();
                }else{
                    sign[e[1]] = -1;
                    neg.push(e);
                }
            }
            if(!neg.isEmpty()){
                System.out.println("NO");
                return;
            }
        }

        pw.println("YES");
        for (int i = 0; i < n; i++) {
            pw.print(sign[i]*p[i] + " ");
        }
        pw.println();

        pw.flush();
        pw.close();
    }

    static class Scanner
    {
        StringTokenizer st; BufferedReader br;
        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}
        public Scanner(String s) throws FileNotFoundException {	br = new BufferedReader(new FileReader(new File(s)));}
        public String next() throws IOException {while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());return st.nextToken();}
        public int nextInt() throws IOException {return Integer.parseInt(next());}
        public long nextLong() throws IOException {return Long.parseLong(next());}
        public String nextLine() throws IOException {return br.readLine();}
        public boolean ready() throws IOException {return br.ready();}
    }
}

import java.io.*;
import java.util.*;
/*
 * Heart beats fast
 * 		Colors and promises
 * 			How to be brave
 * 				How can I love when I am afraid...
 */
//read the question correctly (is y a vowel? what are the exact constraints?)
//look out for SPECIAL CASES (n=1?) and overflow (ll vs int?)
//always declare multidimensional arrays as [2][n] not [n][2]
//it can lead to upto 2-3x diff in runtime
//declare int/long tries with 16 array size due to object overhead :D
public class Main
{
	static node[]gra;
	public static void main(String[] args) throws Exception
	{
		int n=ni();
		int[]p=nia(n);
		int t=ni();
		while(t-->0)
			p[ni()-1]*=-1;
		Stack<Integer> lol=new Stack<Integer>();
		for(int i=n-1; i>=0; i--)
		{
			if(lol.isEmpty()||lol.peek()!=p[i])
				lol.push(-(p[i]=-Math.abs(p[i])));
			else
				lol.pop();
		}
		if(lol.size()==0)
		{
			sop("YES");
			pra(p);
			exit();
		}
		else
		{
			sop("NO");
			exit();
		}
		System.out.print(output);
	}
	static class node
	{
		vector adj=new vector();
	}
	///////////////////////////////////////////
	///////////////////////////////////////////
	///template from here
	static class pair
	{
		int a, b;
		pair(){}
		pair(int c,int d){a=c;b=d;}
	}
	static interface combiner
	{
		public long combine(long a, long b);
	}
	static final int mod=1000000007;
	static final double eps=1e-9;
	static final long inf=100000000000000000L;
	static Reader in=new Reader();
	static StringBuilder output=new StringBuilder();
	static Random rn=new Random();
	static void reverse(int[]a){for(int i=0; i<a.length/2; i++){a[i]^=a[a.length-i-1];a[a.length-i-1]^=a[i];a[i]^=a[a.length-i-1];}}
	static void sort(int[]a)
	{
		int te;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
				a[i]^=a[te];
				a[te]^=a[i];
				a[i]^=a[te];
			}
		}
		Arrays.sort(a);
	}
	static void sort(long[]a)
	{
		int te;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
			a[i]^=a[te];
			a[te]^=a[i];
			a[i]^=a[te];
			}
		}
		Arrays.sort(a);
	}
	static void sort(double[]a)
	{
		int te;
		double te1;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
			te1=a[te];
			a[te]=a[i];
			a[i]=te1;
			}
		}
		Arrays.sort(a);
	}
	static void sort(int[][]a)
	{
		Arrays.sort(a, new Comparator<int[]>()
		{
			public int compare(int[]a,int[]b)
			{
				if(a[0]>b[0])
					return -1;
				if(b[0]>a[0])
					return 1;
				return 0;
			}
		});
	}
	static void sort(pair[]a)
	{
		Arrays.sort(a,new Comparator<pair>()
				{
			@Override
			public int compare(pair a,pair b)
			{
				if(a.a>b.a)
					return 1;
				if(b.a>a.a)
				return -1;
				return 0;
			}
				});
	}
	static int log2n(long a)
	{
		int te=0;
		while(a>0)
		{
			a>>=1;
			++te;
		}
		return te;
	}
	static class vector implements Iterable<Integer>
	{
		int a[],size;
		vector(){a=new int[10];size=0;}
		vector(int n){a=new int[n];size=0;}
		public void add(int b){if(++size==a.length)a=Arrays.copyOf(a, 2*size);a[size-1]=b;}
		public void sort(){Arrays.sort(a, 0, size);}
		public void sort(int l, int r){Arrays.sort(a, l, r);}
		@Override
		public Iterator<Integer> iterator() {
			Iterator<Integer> hola=new Iterator<Integer>()
					{
				int cur=0;
						@Override
						public boolean hasNext() {
							return cur<size;
						}
						@Override
						public Integer next() {
							return a[cur++];
						}
					};
			return hola;
		}
	}
	//output functions////////////////
	static void pr(Object a){output.append(a+"\n");}
	static void pr(){output.append("\n");}
	static void p(Object a){output.append(a);}
	static void pra(int[]a){for(int i:a)output.append(i+" ");output.append("\n");}
	static void pra(long[]a){for(long i:a)output.append(i+" ");output.append("\n");}
	static void pra(String[]a){for(String i:a)output.append(i+" ");output.append("\n");}
	static void pra(double[]a){for(double i:a)output.append(i+" ");output.append("\n");}
	static void sop(Object a){System.out.println(a);}
	static void flush(){System.out.println(output);output=new StringBuilder();}
	//////////////////////////////////
	//input functions/////////////////
	static int ni(){return Integer.parseInt(in.next());}
	static long nl(){return Long.parseLong(in.next());}
	static String ns(){return in.next();}
	static double nd(){return Double.parseDouble(in.next());}
	static int[] nia(int n){int a[]=new int[n];for(int i=0; i<n; i++)a[i]=ni();return a;}
	static int[] pnia(int n){int a[]=new int[n+1];for(int i=1; i<=n; i++)a[i]=ni();return a;}
	static long[] nla(int n){long a[]=new long[n];for(int i=0; i<n; i++)a[i]=nl();return a;}
	static String[] nsa(int n){String a[]=new String[n];for(int i=0; i<n; i++)a[i]=ns();return a;}
	static double[] nda(int n){double a[]=new double[n];for(int i=0; i<n; i++)a[i]=nd();return a;}
	//////////////////////////////////
	//some utility functions
	static void exit(){System.out.print(output);System.exit(0);}
	static int min(int... a){int min=a[0];for(int i:a)min=Math.min(min, i);return min;}
	static int max(int... a){int max=a[0];for(int i:a)max=Math.max(max, i);return max;}
	static int gcd(int... a){int gcd=a[0];for(int i:a)gcd=gcd(gcd, i);return gcd;}
	static long min(long... a){long min=a[0];for(long i:a)min=Math.min(min, i);return min;}
	static long max(long... a){long max=a[0];for(long i:a)max=Math.max(max, i);return max;}
	static long gcd(long... a){long gcd=a[0];for(long i:a)gcd=gcd(gcd, i);return gcd;}
	static String pr(String a, long b){String c="";while(b>0){if(b%2==1)c=c.concat(a);a=a.concat(a);b>>=1;}return c;}
	static long powm(long a, long b, long m){long an=1;long c=a;while(b>0){if(b%2==1)an=(an*c)%m;c=(c*c)%m;b>>=1;}return an;}
	static int gcd(int a, int b){if(b==0)return a;return gcd(b, a%b);}
	static long gcd(long a, long b){if(b==0)return a;return gcd(b, a%b);}
	static class Reader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        public Reader() {
            reader = new BufferedReader(new InputStreamReader(System.in), 32768);
            tokenizer = null;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
    }
}

import java.util.*;
import java.io.*;

// Solution

public class Main
{
  public static void main (String[] argv)
  {
	  new Main();
  }

  boolean test = false;

  public Main(){
	  FastReader in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
	  //FastReader in = new FastReader(new BufferedReader(new FileReader("Main.in")));
      int n = in.nextInt();
      int[] a = new int[n];
      for (int i = 0; i < n; i++) a[i] = in.nextInt();

      int t = in.nextInt();
      boolean[] neg = new boolean[n];
      for (int i = 0; i < t; i++) {
          neg[in.nextInt() - 1] = true;
      }

      Deque<Integer> sk = new ArrayDeque<>();
      for (int i = n - 1; i >= 0; i--) {
          if(sk.isEmpty() || neg[i] || a[i] != a[sk.peek()]) sk.push(i);
          else {
              neg[sk.pop()] = true;
          }
      }

      if (!sk.isEmpty())
         System.out.println("NO");
      else {
         StringBuilder sb = new StringBuilder();
         sb.append("YES\n");
         for (int i = 0; i < n; i++)
             if (neg[i]) sb.append((-a[i]) + " ");
             else        sb.append(a[i] + " ");
         System.out.println(sb);
      }
  }

  static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader(BufferedReader in)
        {
            br = in;
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    String line = br.readLine();
                    if (line == null || line.length() == 0) return "";
                    st = new StringTokenizer(line);
                }
                catch (IOException  e)
                {
                    return "";
                    //e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                return "";
                //e.printStackTrace();
            }
            return str;
        }
    }
}

import java.util.*;
import java.io.*;
public class main_sequence{
    public static void main(String[] args)  throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        StringTokenizer st = new StringTokenizer(br.readLine());
        int[] arr = new int[n];
        for(int i = 0; i < n; ++i)arr[i] = Integer.parseInt(st.nextToken());
        st = new StringTokenizer(br.readLine());
        int neg = Integer.parseInt(st.nextToken());
        if(neg*2 > n){
            System.out.println("NO");
            return;
        }
        for(int i = 0; i < n/2; ++i){
            int e = arr[i];
            arr[i] = arr[n-1-i];
            arr[n-1-i] = e;
        }
        for(int i = 0; i < neg; ++i){
            int ind = Integer.parseInt(st.nextToken());
            ind--;
            arr[n-1-ind] = -arr[n-1-ind];
        }
        Stack<Integer> s = new Stack<Integer> ();
        for(int i = 0; i < n; ++i){
            if(arr[i] > 0 && !s.empty() && arr[s.peek()] == -arr[i])s.pop();
            else{
                arr[i] = -Math.abs(arr[i]);
                s.push(i);
            }
        }
        if(!s.empty()){
            System.out.println("NO");
            return;
        }
        System.out.println("YES");
        StringBuilder res = new StringBuilder("");
        for(int i = n-1; i >= 0; --i)res.append(Integer.toString(arr[i]) + " ");
        System.out.println(res.toString());
    }
}

import java.io.*;
import java.util.*;

public class R176qCMainSequence {

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);

		int n = in.nextInt();
		int p[] = in.nextIntArray(n);

		int t = in.nextInt();
		int q[] = in.nextIntArray(t);

		boolean b[] = new boolean[n];
		for(int x : q)
			b[x - 1] = true;

		Stack<Integer> stack = new Stack<Integer>();

		for(int i = n - 1; i >= 0; i--){
			if(b[i]){
				stack.push(p[i]);
				p[i] *= -1;
			}
			else{
				if(stack.isEmpty() || stack.peek() != p[i]){
					stack.push(p[i]);
					p[i] *= -1;
				}
				else
					stack.pop();
			}
		}

		if(stack.isEmpty()){
			w.println("YES");
			for(int x : p)
				w.print(x + " ");
			w.println();
		}
		else
			w.println("NO");
		w.close();
	}

	static class InputReader {

		private InputStream stream;
		private byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Stack;

public class Main {

    public static void main(String[] args) {
        try (InputStreamReader instream = new InputStreamReader(System.in);
             BufferedReader buffer = new BufferedReader(instream)) {
            String str = buffer.readLine();
            int n = Integer.parseInt(str);
            if(n%2!=0) {
                System.out.println("NO");
                return;
            }
            String s = buffer.readLine();
            String[] split = s.split(" ");
            int[] a = new int[n];
            for(int i=0;i<n;i++) {
                a[i] = Integer.parseInt(split[i]);
            }
            String s1 = buffer.readLine();
            String[] split1 = s1.split(" ");
            boolean[] boole = new boolean[n];
            for(int i=1; i<=Integer.parseInt(split1[0]); i++) {
                int i1 = Integer.parseInt(split1[i]);
                boole[i1-1] = true;
            }
            Stack<Integer> st = new Stack<>();
            for(int i = n - 1; i >= 0; i--){
                if(boole[i]){
                    st.push(a[i]);
                    a[i] *= -1;
                }
                else{
                    if(st.isEmpty() || st.peek() != a[i]){
                        st.push(a[i]);
                        a[i] *= -1;
                    }
                    else
                        st.pop();
                }
            }
            if(!st.isEmpty()) System.out.println("NO");
            else{
                StringBuilder stringBuilder = new StringBuilder();
                stringBuilder.append("YES").append("\n");
                for(int i = 0;i < n;i++)
                    stringBuilder.append(a[i] + " ");
                System.out.println(stringBuilder.toString());
            }

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.LinkedList;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;

public class Solution {
    public static void main(String[] args) throws IOException {
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
                PrintWriter writer = new PrintWriter(System.out)) {
            int n = Integer.parseInt(reader.readLine());
            String no = "NO";
            int[] types =
                    Stream.of(reader.readLine().split(" "))
                            .mapToInt(Integer::parseInt)
                            .toArray();
            int[] closingPositions =
                    Stream.of(reader.readLine().split(" "))
                            .skip(1)
                            .mapToInt(Integer::parseInt)
                            .map(x -> x - 1)
                            .sorted()
                            .toArray();
            int closingIndex = 0;
            LinkedList<Integer> stack = new LinkedList<>(), reverseStack = new LinkedList<>();
            Supplier<Boolean> emptyReverseStack = () -> {
                while (!reverseStack.isEmpty() && !stack.isEmpty()) {
                    int p = stack.pop();
                    if (types[p] == types[reverseStack.peek()]) {
                        types[reverseStack.poll()] *= -1;
                    } else {
                        reverseStack.push(p);
                    }
                }
                return reverseStack.isEmpty();
            };
            for (int position = 0; position < n; position++) {
                if (closingIndex < closingPositions.length && closingPositions[closingIndex] == position) {
                    closingIndex++;
                    reverseStack.push(position);
                    if (!emptyReverseStack.get()) {
                        writer.println(no);
                        return;
                    }
                } else {
                    stack.push(position);
                }
            }
            while(!stack.isEmpty()) {
                reverseStack.push(stack.pop());
                if (!emptyReverseStack.get()) {
                    writer.println(no);
                    return;
                }
            }
            writer.println("YES");
            writer.println(IntStream.of(types).boxed().map(Object::toString).collect(Collectors.joining(" ")));
        }
    }

}

import java.util.*;
import java.io.*;
import java.math.BigInteger;
import static java.lang.Math.*;

/* spar5h */

public class cf1 implements Runnable {

	public void run() {

		InputReader s = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);

		int n = s.nextInt();

		int[] a = new int[n];

		for(int i = 0; i < n; i++)
			a[i] = s.nextInt();

		int[] flag = new int[n];

		int m = s.nextInt();

		for(int i = 0; i < m; i++)
			flag[s.nextInt() - 1] = 1;

		Stack<Integer> stk = new Stack<Integer>();
		int[] res = new int[n];

		for(int i = n - 1; i >= 0; i--) {

			if(flag[i] == 1) {
				res[i] = -1;
				stk.push(i);
				continue;
			}

			if(!stk.isEmpty() && a[i] == a[stk.peek()]) {
				res[i] = 1;
				stk.pop();
			}
			else {
				stk.push(i);
				res[i] = -1;
			}
		}

		if(stk.size() == 0) {

			w.println("YES");

			for(int i = 0; i < n; i++)
				w.print(res[i] * a[i] + " ");

			w.println();
		}

		else
			w.println("NO");

 		w.close();
	}

	static class InputReader {

		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int read() {

			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars) {

				curChar = 0;

				try {
					numChars = stream.read(buf);
				}
				catch (IOException e) {
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}

			return buf[curChar++];
		}

		public String nextLine() {

			BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
			String str = "";

			try {
	            str = br.readLine();
	        }
	        catch (IOException e) {
	            e.printStackTrace();
	        }

	        return str;
		}

		public int nextInt() {

			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-') {
				sgn = -1;
				c = read();
			}

			int res = 0;

			do {
				if(c<'0'||c>'9')
					throw new InputMismatchException();

				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong() {

			int c = read();

			while (isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-') {
				sgn = -1;
				c = read();
			}

			long res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();

				res *= 10;
				res += c - '0';
				c = read();
			}

			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble() {

			int c = read();

			while (isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-') {
				sgn = -1;
				c = read();
			}

			double res = 0;

			while (!isSpaceChar(c) && c != '.') {

				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());

				if (c < '0' || c > '9')
					throw new InputMismatchException();

				res *= 10;
				res += c - '0';
				c = read();
			}

			if (c == '.') {

				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}

			return res * sgn;
		}

		public String readString() {

			int c = read();

			while (isSpaceChar(c))
				c = read();

			StringBuilder res = new StringBuilder();

			do {
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c) {

			if (filter != null)
				return filter.isSpaceChar(c);

			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next() {
			return readString();
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}

	}

	public static void main(String args[]) throws Exception {
		new Thread(null, new cf1(),"cf1",1<<26).start();
	}
}

import java.io.*;
import java.util.*;

/**
 * Created by noureldin on 2/20/17.
 */

public class main {

    public static void main(String[] args) throws Exception{
        IO io = new IO(null,null);
        int n = io.getNextInt();
        int [] A = new int[n],B = new int[n];
        boolean [] isNeg = new boolean[n];
        for (int i = 0;i < n;i++) A[n-1-i] = io.getNextInt();
        int m = io.getNextInt();
        for (int i = 0;i < m;i++) A[n-io.getNextInt()] *= -1;
        Stack<Integer> ST = new Stack<>();
        int neg = 0;
        for (int i = 0;i < n;i++){
            B[i] = A[i];

            if(B[i] > 0 && (ST.isEmpty() || ST.peek() != B[i])) B[i] *= -1;
            if(B[i] > 0) {
                if(ST.isEmpty()){
                    io.println("NO");
                    io.close();
                    System.exit(0);
                }
                ST.pop();
            }
            else ST.add(-B[i]);
        }
        if(!ST.isEmpty()) io.println("NO");
        else{
            io.println("YES");
            for(int i = 0;i < n;i++)
                io.print(B[n-1-i] + " ");
            io.println("");
        }
        io.close();
    }
}

class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] P = reverse(sc.nextInts());
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		int [] C = new int [N];
		for (int i : rep(T))
			C[N - Q[i]] = 1;

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : rep(N)) {
			int p = P[i], s = C[i];
			if (!L.isEmpty() && L.peekFirst() == p && s == 0) { // close
				L.removeFirst();
				C[i] = -1;
			} else {
				L.addFirst(p);
				C[i] = 1;
			}
		}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		Integer [] res = new Integer [N];
		for (int i : rep(N))
			res[i] = -P[i] * C[i];
		res = reverse(res);

		exit(res);
	}

	<T> T [] reverse(T [] A) {
		int N = A.length;
		T [] B = A.clone();
		for (int i : rep(N))
			B[i] = A[N-1-i];
		return B;
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in), (int)2e7));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter out;

	public void solve() throws IOException {
		int N = nextInt();
		int[] a = new int[N];
		for(int i = 0; i < N; i++){
			a[i] = nextInt();
		}
		boolean[] neg = new boolean[N];
		int Q = nextInt();
		for(int i = 0; i < Q; i++){
			neg[ nextInt() - 1] = true;
		}

		Stack<Integer> s = new Stack<Integer>();
		for(int i = N-1; i >= 0; i--){
			if( s.empty() || neg[i] || s.peek() != a[i] ){
				neg[i] = true;
				s.push(a[i]);
			}
			else{
				s.pop();
			}
		}
		if( s.empty() ){
			out.println("YES");
			for(int i = 0; i < N; i++){
				out.print( neg[i]? -1*a[i]: a[i] ); out.print(" ");
			}
		}
		else{
			out.println("NO");
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new C().run();
	}

	public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            out = new PrintWriter(System.out);
            solve();
            reader.close();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

}

import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

// Main Sequence
// 2013/03/23
public class P286C{
	BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

	int INF=1<<28;
	double EPS=1e-9;

	int n, m;
	int[] p, q;

	void run(){
		try{
			n=Integer.parseInt(br.readLine());
			p=new int[n];
			String[] ss=br.readLine().split(" ");
			for(int i=0; i<n; i++){
				p[i]=Integer.parseInt(ss[i]);
			}
			ss=br.readLine().split(" ");
			m=Integer.parseInt(ss[0]);
			q=new int[m];
			for(int i=0; i<m; i++){
				q[i]=Integer.parseInt(ss[i+1])-1;
			}
			solve();
		}catch(Exception e){}
	}

	void solve(){
		int[] sign=new int[n];
		for(int i : q){
			sign[i]=-1;
		}
		Stack<Integer> stack=new Stack<Integer>();
		for(int i=n-1; i>=0; i--){
			if(sign[i]==-1){
				stack.push(p[i]);
			}else{
				if(!stack.isEmpty()&&stack.peek()==p[i]){
					stack.pop();
					sign[i]=+1;
				}else{
					stack.push(p[i]);
					sign[i]=-1;
				}
			}
		}
		StringBuilder sb=new StringBuilder();
		if(stack.isEmpty()){
			sb.append("YES\n");
			for(int i=0; i<n; i++){
				sb.append(p[i]*sign[i]);
				if(i<n-1){
					sb.append(' ');
				}
			}
		}else{
			sb.append("NO");
		}
		println(sb.toString());
	}

	void println(String s){
		System.out.println(s);
	}

	public static void main(String[] args){
		Locale.setDefault(Locale.US);
		new P286C().run();
	}
}

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Stack;
import java.util.StringTokenizer;

public class Solver {

	public static void main(String[] Args) throws NumberFormatException,
			IOException {
		new Solver().Run();
	}

	PrintWriter pw;
	StringTokenizer Stok;
	BufferedReader br;

	public String nextToken() throws IOException {
		while (Stok == null || !Stok.hasMoreTokens()) {
			Stok = new StringTokenizer(br.readLine());
		}
		return Stok.nextToken();
	}

	public int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}

	public double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}

	public long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(nextToken());
	}

	int n;
	int[] p;
	boolean isPossible;

	boolean makeSeqv(){
		Stack<Integer> brakes=new Stack<Integer>();
		for (int i=n-1; i>=0; i--){
			if (p[i]<0){
				brakes.add(p[i]);
			}
			else
			{
				if (!brakes.isEmpty() && brakes.peek()==-p[i]){
					brakes.pop();
				}
				else
				{
					p[i]=-p[i];
					brakes.add(p[i]);
				}
			}
		}
		return brakes.isEmpty();
	}

	public void Run() throws NumberFormatException, IOException {
		//br = new BufferedReader(new FileReader("input.txt")); pw = new PrintWriter("output.txt");
		br=new BufferedReader(new InputStreamReader(System.in));  pw=new PrintWriter(new OutputStreamWriter(System.out));

		n=nextInt();
		p=new int[n];
		for (int i=0; i<n; i++){
			p[i]=nextInt();
		}
		int t=nextInt();
		for (int i=0; i<t; i++){
			int zn=nextInt()-1;
			p[zn]=-p[zn];
		}

		if (makeSeqv()){
			pw.println("YES");
			for (int i=0; i<n; i++){
				pw.print(p[i]);
				pw.print(' ');
			}
			pw.println();
		}
		else
		{
			pw.println("NO");
		}
		pw.flush();
		pw.close();
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;

public class ProblemC {

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		int n = Integer.valueOf(in.readLine());
		int[] p = new int[n];
		String[] pi = in.readLine().split(" ");
		for (int i = 0 ; i < n ; i++) {
			p[i] = Integer.valueOf(pi[i]);
		}

		String[] ti = in.readLine().split(" ");
		boolean[] ism = new boolean[n];
		int tn = ti.length;
		for (int i = 1 ; i < tn ; i++) {
			ism[Integer.valueOf(ti[i])-1] = true;
		}

		int[] rt = new int[2*n];
		int sh = 0;
		for (int i = n - 1 ; i >= 0 ; i--) {
			boolean r = ism[i];
			if (!r) {
				if (sh == 0 || rt[sh-1] != p[i]) {
					r = true;
				}
			}
			if (r) {
				ism[i] = true;
				rt[sh++] = p[i];
			} else {
				sh--;
			}
		}
		if (sh == 0) {
			StringBuffer b = new StringBuffer();
			for (int i = 0 ; i < n ; i++) {
				b.append(" ");
				if (ism[i]) {
					b.append(-p[i]);
				} else {
					b.append(p[i]);
				}
			}
			out.println("YES");
			out.println(b.substring(1));
		} else {
			out.println("NO");
		}
		out.flush();
	}

	public static void debug(Object... o) {
		System.err.println(Arrays.deepToString(o));
	}
}

//package round176;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;

public class C {
	InputStream is;
	PrintWriter out;
	String INPUT = "";

	void solve()
	{
		int n = ni();
		int[] a = na(n);
		char[] s = new char[n];
		int m = ni();
		for(int i = 0;i < m;i++){
			s[ni()-1] = ')';
		}

		int[] st = new int[n];
		int h = 0;
		for(int i = n-1;i >= 0;i--){
			if(s[i] == ')'){
				st[h++] = a[i];
			}else{
				if(h-1 >= 0 && st[h-1] == a[i]){
					s[i] = '(';
					st[h] = 0;
					h--;
				}else{
					s[i] = ')';
					st[h++] = a[i];
				}
			}
		}
		if(h != 0){
			out.println("NO");
		}else{
			out.println("YES");
			for(int i = 0;i < n;i++){
				if(i > 0)out.print(" ");
				if(s[i] == '('){
					out.print(a[i]);
				}else{
					out.print(-a[i]);
				}
			}
			out.println();
		}
	}

	void run() throws Exception
	{
		is = oj ? System.in : new ByteArrayInputStream(INPUT.getBytes());
		out = new PrintWriter(System.out);

		long s = System.currentTimeMillis();
		solve();
		out.flush();
		tr(System.currentTimeMillis()-s+"ms");
	}

	public static void main(String[] args) throws Exception { new C().run(); }

	private byte[] inbuf = new byte[1024];
	private int lenbuf = 0, ptrbuf = 0;

	private int readByte()
	{
		if(lenbuf == -1)throw new InputMismatchException();
		if(ptrbuf >= lenbuf){
			ptrbuf = 0;
			try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
			if(lenbuf <= 0)return -1;
		}
		return inbuf[ptrbuf++];
	}

	private int[] na(int n)
	{
		int[] a = new int[n];
		for(int i = 0;i < n;i++)a[i] = ni();
		return a;
	}

	private int ni()
	{
		int num = 0, b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}

		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	private void tr(Object... o) { if(!oj)System.out.println(Arrays.deepToString(o)); }
}

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.util.Stack;
import java.util.Vector;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author BSRK Aditya (bsrkaditya@gmail.com)
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.readInt();
        int [] p = new int[n];
        for(int i = 0; i < n; ++i) p[i] = in.readInt();
        int t = in.readInt();
        int [] q = new int[t];
        for(int i = 0; i < t; ++i) q[i] = in.readInt();
        Arrays.sort(q);

        Stack<Integer> inp = new Stack<Integer>();
        Stack<Integer> ix = new Stack<Integer>();
        Stack<Integer> temp = new Stack<Integer>();
        Stack<Integer> tix = new Stack<Integer>();
        inp.ensureCapacity(n);
        ix.ensureCapacity(n);
        temp.ensureCapacity(n);
        tix.ensureCapacity(n);

        boolean poss = true;

        for(int i = 0, j = 0; poss && i < n; ++i) {
            if(q.length > j && (i+1) == q[j]) {
                j++;
                poss = false;
                int looking_for = p[i];
                while(!inp.empty()) {
                    int e = inp.pop();
                    int e_ix = ix.pop();
                    if(!temp.empty() && e == temp.peek()) {
                        temp.pop();
                        int e_ix2 = tix.pop();
                        p[e_ix2] = -p[e_ix2];
                    } else if(temp.empty() && e == looking_for) {
                        poss = true;
                        p[i] = -p[i];
                        break;
                    } else {
                        temp.push(e);
                        tix.push(e_ix);
                    }
                }
            } else {
                inp.push(p[i]);
                ix.push(i);
            }
        }
        if(poss) {
            while(!inp.empty()) {
                int e = inp.pop();
                int e_ix = ix.pop();
                if(!temp.empty() && e == temp.peek()) {
                    temp.pop();
                    int e_ix2 = tix.pop();
                    p[e_ix2] = -p[e_ix2];
                } else {
                    temp.push(e);
                    tix.push(e_ix);
                }
            }
            poss = temp.empty();
        }

        if(poss) {
            out.printLine("YES");
            for(int x : p) {
                out.print(x);
                out.print(" ");
            }
            out.printLine();
        } else out.printLine("NO");
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return isWhitespace(c);
    }

    public static boolean isWhitespace(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object...objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

}

import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.util.Stack;
import java.util.Vector;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author BSRK Aditya (bsrkaditya@gmail.com)
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n = in.readInt();
        int [] p = new int[n];
        for(int i = 0; i < n; ++i) p[i] = in.readInt();
        int t = in.readInt();
        int [] q = new int[t];
        for(int i = 0; i < t; ++i) q[i] = in.readInt();
        Arrays.sort(q);

        Stack<Integer> inp = new Stack<Integer>();
        Stack<Integer> ix = new Stack<Integer>();
        inp.ensureCapacity(n);
        ix.ensureCapacity(n);

        boolean poss = true;

        for(int i = 0, j = 0; poss && i < n; ++i) {
            if(q.length > j && (i+1) == q[j]) {
                j++;
                poss = false;
                int looking_for = p[i];
                Stack<Integer> temp = new Stack<Integer>();
                Stack<Integer> tix = new Stack<Integer>();
                //tix.ensureCapacity(ix.size());
                //temp.ensureCapacity(inp.size());
                while(!inp.empty()) {
                    int e = inp.pop();
                    int e_ix = ix.pop();
                    if(!temp.empty()) {
                       if(e == temp.peek()) {
                           temp.pop();
                           int e_ix2 = tix.pop();
                           p[e_ix2] = -p[e_ix2];
                       } else {
                           temp.push(e);
                           tix.push(e_ix);
                       }
                    } else {
                        if(e == looking_for) {
                            poss = true;
                            p[i] = -p[i];
                            break;
                        } else {
                            temp.push(e);
                            tix.push(e_ix);
                        }
                    }
                }
            } else {
                inp.push(p[i]);
                ix.push(i);
            }
        }
        if(poss) {
            Stack<Integer> temp = new Stack<Integer>();
            Stack<Integer> tix = new Stack<Integer>();
            //temp.ensureCapacity(inp.size());
            //tix.ensureCapacity(ix.size());
            while(!inp.empty()) {
                int e = inp.pop();
                int e_ix = ix.pop();
                if(!temp.empty() && e == temp.peek()) {
                    temp.pop();
                    int e_ix2 = tix.pop();
                    p[e_ix2] = -p[e_ix2];
                }
                else {
                    temp.push(e);
                    tix.push(e_ix);
                }
            }
            poss = temp.empty();
        }

        if(poss) {
            out.printLine("YES");
            for(int x : p) {
                out.print(x);
                out.print(" ");
            }
            out.printLine();
        } else out.printLine("NO");
    }
}

class InputReader {

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;
    private SpaceCharFilter filter;

    public InputReader(InputStream stream) {
        this.stream = stream;
    }

    public int read() {
        if (numChars == -1)
            throw new InputMismatchException();
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar++];
    }

    public int readInt() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        int res = 0;
        do {
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        } while (!isSpaceChar(c));
        return res * sgn;
    }

    public boolean isSpaceChar(int c) {
        if (filter != null)
            return filter.isSpaceChar(c);
        return isWhitespace(c);
    }

    public static boolean isWhitespace(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    public interface SpaceCharFilter {
        public boolean isSpaceChar(int ch);
    }
}

class OutputWriter {
    private final PrintWriter writer;

    public OutputWriter(OutputStream outputStream) {
        writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public OutputWriter(Writer writer) {
        this.writer = new PrintWriter(writer);
    }

    public void print(Object...objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    public void printLine(Object...objects) {
        print(objects);
        writer.println();
    }

    public void close() {
        writer.close();
    }

}

import java.io.*;
import java.util.*;
public class z3 {
	public static int[] st=new int[1000001];
	public static int[] a=new int[1000001];
	public static int iss1(int k,int l)
	{
	  if (k>l) return 1;
	  if (a[k]<=0) return 0; else
	  {
		  int kol=0;
		  for (int i=l;i>=k;i--)
		  {
			  if (kol==0) {kol=1;st[kol]=Math.abs(a[i]);a[i]=-Math.abs(a[i]);} else
			  {
				  if (st[kol]==a[i]) kol=kol-1; else
				  {kol+=1;st[kol]=Math.abs(a[i]);a[i]=-Math.abs(a[i]);}
			  }
		  }
		  if (kol!=0) return 0; else return 1;
	  }
	}
	public static void main(String[] args) throws IOException {
	Scanner	in = new Scanner(System.in);
	int n=in.nextInt();

	for (int i=0;i<n;i++) a[i]=in.nextInt();
	int t=in.nextInt();
	int temp;
	for (int i=0;i<t;i++) {temp=in.nextInt();a[temp-1]=-Math.abs(a[temp-1]);}
	if ((n%2)!=0) System.out.println("NO");
	else
	{
		if (iss1(0,n-1)>0) {
			System.out.println("YES");
			//StringBuilder s=new StringBuilder();
			for (int i=0;i<n;i++) {System.out.print(Integer.toString(a[i]));System.out.print("");}

		}
		else System.out.println("NO");
	}
}
}

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

   private void solve() throws IOException {
      int n = ni();
      int p[] = nia(n);
      int t = ni();
      boolean sg[] = new boolean[n];

      for (int i = 0; i < t; ++i) {
         sg[ni() - 1] = true;
      }

      int s[] = new int[n];
      int tos = 0;

      for (int i = n - 1; i >= 0; --i) {
         s[tos++] = i;

         if (tos >= 2) {
            int a = s[tos - 1];
            int b = s[tos - 2];
            if (p[a] == p[b]) {
               if (!sg[a]) {
                  tos -= 2;
               } else {
                  sg[a] = true;
               }
            }
         } else {
            sg[i] = true;
         }
      }

      if (tos == 0) {
         prln("YES");
         for (int i = 0; i < n; ++i) {
            if (sg[i])
               pr("-" + p[i] + " ");
            else
               pr(p[i] + " ");
         }
      } else
         prln("NO");
   }

   public static void main(String[] args) {
      new Main().run();
   }

   public void run() {
      try {
         if (isFileIO) {
            pw = new PrintWriter(new File("output.out"));
            br = new BufferedReader(new FileReader("input.in"));
         } else {
            pw = new PrintWriter(System.out);
            br = new BufferedReader(new InputStreamReader(System.in));
         }
         solve();
         pw.close();
         br.close();
      } catch (IOException e) {
         System.err.println("IO Error");
      }
   }

   private int[] nia(int n) throws IOException {
      int arr[] = new int[n];
      for (int i = 0; i < n; ++i)
         arr[i] = Integer.parseInt(nextToken());
      return arr;
   }

   private int[] niam1(int n) throws IOException {
      int arr[] = new int[n];
      for (int i = 0; i < n; ++i)
         arr[i] = Integer.parseInt(nextToken()) - 1;
      return arr;
   }

   private long[] nla(int n) throws IOException {
      long arr[] = new long[n];
      for (int i = 0; i < n; ++i)
         arr[i] = Long.parseLong(nextToken());
      return arr;
   }

   private void pr(Object o) {
      pw.print(o);
   }

   private void prln(Object o) {
      pw.println(o);
   }

   private void prln() {
      pw.println();
   }

   int ni() throws IOException {
      return Integer.parseInt(nextToken());
   }

   long nl() throws IOException {
      return Long.parseLong(nextToken());
   }

   double nd() throws IOException {
      return Double.parseDouble(nextToken());
   }

   private String nextToken() throws IOException {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
         tokenizer = new StringTokenizer(br.readLine());
      }

      return tokenizer.nextToken();
   }

   // private void qsort(int a[]) {
   // Random rand = new Random(271828182l);
   // qsort(a, 0, a.length, rand);
   // }
   //
   // private void qsort(int a[], int l, int r, Random rand) {
   // if (r - l <= 1)
   // return;
   //
   // if (r - l == 2) {
   // if (a[r - 1] < a[l]) {
   // int t = a[r - 1];
   // a[r - 1] = a[l];
   // a[l] = t;
   // }
   //
   // return;
   // }
   //
   // int x = a[rand.nextInt(r - l) + l];
   // int i = l, j = r - 1;
   // while (i < j) {
   // while (a[i] < x)
   // ++i;
   // while (a[j] > x)
   // --j;
   // if (i < j) {
   // int t = a[i];
   // a[i] = a[j];
   // a[j] = t;
   // ++i;
   // --j;
   // }
   // }
   //
   // qsort(a, l, j + 1, rand);
   // qsort(a, i, r, rand);
   // }

   private BufferedReader br;
   private StringTokenizer tokenizer;
   private PrintWriter pw;
   private final boolean isFileIO = false;
}

import java.util.*;
import java.io.*;

public class Main{

    BufferedReader in;
    StringTokenizer str = null;
    PrintWriter out;

    private String next() throws Exception{
    	if (str == null || !str.hasMoreElements())
    	    str = new StringTokenizer(in.readLine());
    	return str.nextToken();
    }

    private int nextInt() throws Exception{
	   return Integer.parseInt(next());
    }

    int n;
    int []p;
    Map<Integer, Integer> map, cmap;
    Stack<Integer> stack;
    public void run() throws Exception{
    	in = new BufferedReader(new InputStreamReader(System.in));
    	out = new PrintWriter(System.out);

        n = nextInt();
        if (n % 2 == 1) {
            out.println("NO");
            out.close();
            return;
        }

        map = new HashMap<Integer, Integer>();
        cmap = new HashMap<Integer, Integer>();

        for(int i=0;i<n;i++){
            int x = nextInt();
            if (!map.containsKey(x)) {
                map.put(x, 0);
            }
            int c = map.get(x);
            map.put(x, c+1);
        }

        int size = map.keySet().size();
        int nums[] = new int[size];
        int yk = 0;
        for(int i : map.keySet()){
            int x = map.get(i);
            if (x % 2 == 1) {
                out.println("NO");
                out.close();
                return;
            }
            nums[yk++] = i;
            cmap.put(i, x);
        }
        //System.out.println(Arrays.toString(nums));
        yk = 0;
        int a[] = new int[n];
        int m = nextInt();
        if (m > n/2) {
            out.println("NO");
            out.close();
            return;
        }
        int q[] = new int[m];
        for(int i=0;i<m;i++) q[i] = nextInt()-1;
        Arrays.sort(q);
        for(int i=0;i<m;i++){
            int x = q[i];
            int c = nums[yk];
            int count = map.get(c);
            int count2 = cmap.get(c);
            while(count <= count2/2) {
                yk = (yk + 1) % size;
                c = nums[yk];
                count = map.get(c);
                count2 = cmap.get(c);
            }
            a[x] = -c;
            map.put(c, count - 1);
            yk = (yk + 1) % size;
        }
        //System.out.println(Arrays.toString(a));

        stack = new Stack<Integer>();
        for(int i=0;i<n;i++){
            if (a[i] != 0) {
                if (stack.size() == 0) {
                    out.println("NO");
                    out.close();
                    return;
                }
                int x = stack.pop();
                a[x] = -a[i];
                int t = map.get(a[x]);
                if (t == 1) map.remove(a[x]);
                else map.put(a[x], t - 1);
            }else{
                stack.push(i);
            }
        }
        yk = size-1;
        while(yk >= 0 && stack.size() > 0) {
            int c = nums[yk];
            int count = map.get(c);
            while(count == 0) {
                yk--;
                c = nums[yk];
                count = map.get(c);
            }

            while(count > 0) {
                int x = stack.pop();
                int y = stack.pop();
                a[x] = -c;
                a[y] = c;
                count-=2;
            }

            map.remove(c);
        }
        out.println("YES");
        for(int i=0;i<n;i++){
            out.print(a[i] + " ");
        }
        out.println();
        out.close();
    }

    public static void main(String args[]) throws Exception{
	   new Main().run();
    }
}

import java.util.*;
import java.io.*;

public class Main{

    BufferedReader in;
    StringTokenizer str = null;
    PrintWriter out;

    private String next() throws Exception{
    	if (str == null || !str.hasMoreElements())
    	    str = new StringTokenizer(in.readLine());
    	return str.nextToken();
    }

    private int nextInt() throws Exception{
	   return Integer.parseInt(next());
    }

    int n;
    int []p;
    Map<Integer, Integer> map, cmap;
    Stack<Integer> stack;
    public void run() throws Exception{
    	in = new BufferedReader(new InputStreamReader(System.in));
    	out = new PrintWriter(System.out);

        n = nextInt();
        if (n % 2 == 1) {
            out.println("NO");
            out.close();
            return;
        }

        map = new HashMap<Integer, Integer>();
        cmap = new HashMap<Integer, Integer>();

        for(int i=0;i<n;i++){
            int x = nextInt();
            if (!map.containsKey(x)) {
                map.put(x, 0);
            }
            int c = map.get(x);
            map.put(x, c+1);
        }

        int size = map.keySet().size();
        int nums[] = new int[size];
        int yk = 0;
        for(int i : map.keySet()){
            int x = map.get(i);
            if (x % 2 == 1) {
                out.println("NO");
                out.close();
                return;
            }
            nums[yk++] = i;
            cmap.put(i, x);
        }
        //System.out.println(Arrays.toString(nums));
        yk--;
        int a[] = new int[n];
        int m = nextInt();
        if (m > n/2) {
            out.println("NO");
            out.close();
            return;
        }
        for(int i=0;i<m;i++){
            int x = nextInt()-1;
            int c = nums[yk];
            int count = map.get(c);
            int count2 = cmap.get(c);
            while(count <= count2/2) {
                yk--;
                if (yk < 0) yk = size-1;
                c = nums[yk];
                count = map.get(c);
            }
            a[x] = -c;
            map.put(c, count - 1);
            yk--;
            if (yk < 0) yk = size-1;
        }
        //System.out.println(Arrays.toString(a));

        stack = new Stack<Integer>();
        for(int i=0;i<n;i++){
            if (a[i] != 0) {
                if (stack.size() == 0) {
                    out.println("NO");
                    out.close();
                    return;
                }
                int x = stack.pop();
                a[x] = -a[i];
                int t = map.get(a[x]);
                if (t == 1) map.remove(a[x]);
                else map.put(a[x], t - 1);
            }else{
                stack.push(i);
            }
        }
        yk = size-1;
        while(yk >= 0 && stack.size() > 0) {
            int c = nums[yk];
            int count = map.get(c);
            while(count == 0) {
                yk--;
                c = nums[yk];
                count = map.get(c);
            }

            while(count > 0) {
                int x = stack.pop();
                int y = stack.pop();
                a[x] = -c;
                a[y] = c;
                count-=2;
            }

            map.remove(c);
        }

        for(int i=0;i<n;i++){
            out.print(a[i] + " ");
        }
        out.println();
        out.close();
    }

    public static void main(String args[]) throws Exception{
	   new Main().run();
    }
}

import java.util.*;
import java.io.*;

public class Main{

    BufferedReader in;
    StringTokenizer str = null;
    PrintWriter out;

    private String next() throws Exception{
    	if (str == null || !str.hasMoreElements())
    	    str = new StringTokenizer(in.readLine());
    	return str.nextToken();
    }

    private int nextInt() throws Exception{
	   return Integer.parseInt(next());
    }

    int n;
    int []p;
    Map<Integer, Integer> map, cmap;
    Stack<Integer> stack;
    public void run() throws Exception{
    	in = new BufferedReader(new InputStreamReader(System.in));
    	out = new PrintWriter(System.out);

        n = nextInt();
        if (n % 2 == 1) {
            out.println("NO");
            out.close();
            return;
        }

        map = new HashMap<Integer, Integer>();
        cmap = new HashMap<Integer, Integer>();

        for(int i=0;i<n;i++){
            int x = nextInt();
            if (!map.containsKey(x)) {
                map.put(x, 0);
            }
            int c = map.get(x);
            map.put(x, c+1);
        }

        int size = map.keySet().size();
        int nums[] = new int[size];
        int yk = 0;
        for(int i : map.keySet()){
            int x = map.get(i);
            if (x % 2 == 1) {
                out.println("NO");
                out.close();
                return;
            }
            nums[yk++] = i;
            cmap.put(i, x);
        }
        //System.out.println(Arrays.toString(nums));
        yk--;
        int a[] = new int[n];
        int m = nextInt();
        if (m > n/2) {
            out.println("NO");
            out.close();
            return;
        }
        int q[] = new int[m];
        for(int i=0;i<m;i++) q[i] = nextInt()-1;
        Arrays.sort(q);
        for(int i=0;i<m;i++){
            int x = q[i];
            int c = nums[yk];
            int count = map.get(c);
            int count2 = cmap.get(c);
            while(count <= count2/2) {
                yk--;
                if (yk < 0) yk = size-1;
                c = nums[yk];
                count = map.get(c);
                count2 = cmap.get(c);
            }
            a[x] = -c;
            map.put(c, count - 1);
            yk--;
            if (yk < 0) yk = size-1;
        }
        //System.out.println(Arrays.toString(a));

        stack = new Stack<Integer>();
        for(int i=0;i<n;i++){
            if (a[i] != 0) {
                if (stack.size() == 0) {
                    out.println("NO");
                    out.close();
                    return;
                }
                int x = stack.pop();
                a[x] = -a[i];
                int t = map.get(a[x]);
                if (t == 1) map.remove(a[x]);
                else map.put(a[x], t - 1);
            }else{
                stack.push(i);
            }
        }
        yk = size-1;
        while(yk >= 0 && stack.size() > 0) {
            int c = nums[yk];
            int count = map.get(c);
            while(count == 0) {
                yk--;
                c = nums[yk];
                count = map.get(c);
            }

            while(count > 0) {
                int x = stack.pop();
                int y = stack.pop();
                a[x] = -c;
                a[y] = c;
                count-=2;
            }

            map.remove(c);
        }
        out.println("YES");
        for(int i=0;i<n;i++){
            out.print(a[i] + " ");
        }
        out.println();
        out.close();
    }

    public static void main(String args[]) throws Exception{
	   new Main().run();
    }
}

import java.util.*;
import java.io.*;

public class Main{

    BufferedReader in;
    StringTokenizer str = null;
    PrintWriter out;

    private String next() throws Exception{
    	if (str == null || !str.hasMoreElements())
    	    str = new StringTokenizer(in.readLine());
    	return str.nextToken();
    }

    private int nextInt() throws Exception{
	   return Integer.parseInt(next());
    }

    int n;
    int []p;
    Map<Integer, Integer> map, cmap;
    Stack<Integer> stack;
    public void run() throws Exception{
    	in = new BufferedReader(new InputStreamReader(System.in));
    	out = new PrintWriter(System.out);

        n = nextInt();
        if (n % 2 == 1) {
            out.println("NO");
            out.close();
            return;
        }

        map = new HashMap<Integer, Integer>();
        cmap = new HashMap<Integer, Integer>();

        for(int i=0;i<n;i++){
            int x = nextInt();
            if (!map.containsKey(x)) {
                map.put(x, 0);
            }
            int c = map.get(x);
            map.put(x, c+1);
        }

        int size = map.keySet().size();
        int nums[] = new int[size];
        int yk = 0;
        for(int i : map.keySet()){
            int x = map.get(i);
            if (x % 2 == 1) {
                out.println("NO");
                out.close();
                return;
            }
            nums[yk++] = i;
            cmap.put(i, x);
        }
        //System.out.println(Arrays.toString(nums));
        yk--;
        int a[] = new int[n];
        int m = nextInt();
        if (m > n/2) {
            out.println("NO");
            out.close();
            return;
        }
        for(int i=0;i<m;i++){
            int x = nextInt()-1;
            int c = nums[yk];
            int count = map.get(c);
            int count2 = cmap.get(c);
            while(count <= count2/2) {
                yk--;
                if (yk < 0) yk = size-1;
                c = nums[yk];
                count = map.get(c);
            }
            a[x] = -c;
            map.put(c, count - 1);
            yk--;
            if (yk < 0) yk = size-1;
        }
        //System.out.println(Arrays.toString(a));

        stack = new Stack<Integer>();
        for(int i=0;i<n;i++){
            if (a[i] != 0) {
                if (stack.size() == 0) {
                    out.println("NO");
                    out.close();
                    return;
                }
                int x = stack.pop();
                a[x] = -a[i];
                int t = map.get(a[x]);
                if (t == 1) map.remove(a[x]);
                else map.put(a[x], t - 1);
            }else{
                stack.push(i);
            }
        }
        yk = size-1;
        while(yk >= 0 && stack.size() > 0) {
            int c = nums[yk];
            int count = map.get(c);
            while(count == 0) {
                yk--;
                c = nums[yk];
                count = map.get(c);
            }

            while(count > 0) {
                int x = stack.pop();
                int y = stack.pop();
                a[x] = -c;
                a[y] = c;
                count-=2;
            }

            map.remove(c);
        }
        out.println("YES");
        for(int i=0;i<n;i++){
            out.print(a[i] + " ");
        }
        out.println();
        out.close();
    }

    public static void main(String args[]) throws Exception{
	   new Main().run();
    }
}

import java.util.*;
import java.io.*;

public class Main{

    BufferedReader in;
    StringTokenizer str = null;
    PrintWriter out;

    private String next() throws Exception{
    	if (str == null || !str.hasMoreElements())
    	    str = new StringTokenizer(in.readLine());
    	return str.nextToken();
    }

    private int nextInt() throws Exception{
	   return Integer.parseInt(next());
    }

    int n;
    int []p;
    Map<Integer, Integer> map, cmap;
    Stack<Integer> stack;
    public void run() throws Exception{
    	in = new BufferedReader(new InputStreamReader(System.in));
    	out = new PrintWriter(System.out);

        n = nextInt();
        if (n % 2 == 1) {
            out.println("NO");
            out.close();
            return;
        }

        map = new HashMap<Integer, Integer>();
        int p[] = new int[n];

        for(int i=0;i<n;i++){
            int x = nextInt();
            if (!map.containsKey(x)) {
                map.put(x, 0);
            }
            int c = map.get(x);
            map.put(x, c+1);
            p[i] = x;
        }

        int m = nextInt();
        if (m > n/2) {
            out.println("NO");
            out.close();
            return;
        }
        int q[] = new int[m];
        for(int i=0;i<m;i++){
            q[i] = nextInt()-1;
            p[q[i]] = -p[q[i]];
            int c = map.get(-p[q[i]]);
            map.put(-p[q[i]], c - 1);
        }

        int a[] = new int[n];
        for(int i=0;i<n;i++)
            if (p[i] < 0) a[i] = p[i];

        stack = new Stack<Integer>();
        for(int i=0;i<n;i++){
            if (a[i] == 0) {
                stack.push(i);
            }else{
                int c = -a[i];
                int x = stack.pop();
                a[x] = c;

                if (!map.containsKey(c)){
                    out.println("NO");
                    out.close();
                    return;
                }

                int cnt = map.get(c);
                if (cnt == 1) {
                    map.remove(c);
                }else{
                    map.put(c, cnt-1);
                }
            }
        }
        int size = stack.size();
        while(stack.size() > size/2) {
            int x = stack.pop();
            a[x] = -p[x];
        }

        for(int i=0;i<n;i++){
            if (a[i] == 0) a[i] = p[i];
        }

        out.println("YES");
        for(int i=0;i<n;i++){
            out.print(a[i] + " ");
        }
        out.println();
        out.close();
    }

    public static void main(String args[]) throws Exception{
	   new Main().run();
    }
}

import java.util.*;
import java.io.*;

public class Main{

    BufferedReader in;
    StringTokenizer str = null;
    PrintWriter out;

    private String next() throws Exception{
    	if (str == null || !str.hasMoreElements())
    	    str = new StringTokenizer(in.readLine());
    	return str.nextToken();
    }

    private int nextInt() throws Exception{
	   return Integer.parseInt(next());
    }

    int n;
    int []p;
    Map<Integer, Integer> map, cmap;
    Stack<Integer> stack;
    public void run() throws Exception{
    	in = new BufferedReader(new InputStreamReader(System.in));
    	out = new PrintWriter(System.out);

        n = nextInt();
        if (n % 2 == 1) {
            out.println("NO");
            out.close();
            return;
        }

        map = new HashMap<Integer, Integer>();
        int p[] = new int[n];

        for(int i=0;i<n;i++){
            int x = nextInt();
            if (!map.containsKey(x)) {
                map.put(x, 0);
            }
            int c = map.get(x);
            map.put(x, c+1);
            p[i] = x;
        }

        int m = nextInt();
        if (m > n/2) {
            out.println("NO");
            out.close();
            return;
        }
        int q[] = new int[m];
        for(int i=0;i<m;i++){
            q[i] = nextInt()-1;
            p[q[i]] = -p[q[i]];
            int c = map.get(-p[q[i]]);
            map.put(-p[q[i]], c - 1);
        }

        int a[] = new int[n];
        for(int i=0;i<n;i++)
            if (p[i] < 0) a[i] = p[i];

        stack = new Stack<Integer>();
        for(int i=0;i<n;i++){
            if (a[i] == 0) {
                stack.push(i);
            }else{
                int c = -a[i];
                int x = stack.pop();
                a[x] = c;

                if (!map.containsKey(c)){
                    out.println("NO");
                    out.close();
                    return;
                }

                int cnt = map.get(c);
                if (cnt == 1) {
                    map.remove(c);
                }else{
                    map.put(c, cnt-1);
                }
            }
        }
        if (stack.size() > 0){
            int nums[] = new int[stack.size()];
            int yk = nums.length-1;
            while(stack.size() > 0) {
                nums[yk--] = stack.pop();
            }

            stack.push(nums[0]);
            for(int i=1;i<nums.length;i++){
                if (stack.size() == 0){
                    stack.push(nums[i]);
                    continue;
                }
                int k = stack.peek();
                if (p[k] == p[nums[i]]) {
                    stack.pop();
                    a[nums[i]] = -p[nums[i]];
                    a[k] = p[nums[i]];
                }else{
                    stack.push(nums[i]);
                }
            }
            if (stack.size() > 0){
                out.println("NO");
                out.close();
                return;
            }
        }

        out.println("YES");
        for(int i=0;i<n;i++){
            out.print(a[i] + " ");
        }
        out.println();
        out.close();
    }

    public static void main(String args[]) throws Exception{
	   new Main().run();
    }
}

import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskE {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        int n = in.nextInt();
        if (n % 2 != 0) {
            out.print("NO");
            return;
        }
        int[] p = new int[n];
        for (int i = 0; i < n; i++) {
            p[i] = in.nextInt();
        }

        if (n > 1000) {
            out.print("NO");
            return;
        }

        int t = in.nextInt();
        for (int i = 0; i < t; i++) {
            int k = in.nextInt();
            p[k - 1] *= -1;
        }

        int[] s = new int[n];
        int h = -1;

        for (int i = n - 1; i >= 0; i--) {
            if (p[i] < 0 || h < 0 || s[h] != p[i]) {
                if (p[i] > 0)
                    p[i] *= -1;
                h++;
                s[h] = -p[i];
            } else {
                h--;
            }
        }

        if (h >= 0) {
            out.print("NO");
            return;
        }

        out.println("YES");
        for (int i = 0; i < n; i++) {
            out.print(p[i]);
            out.print(' ');
        }

    }
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		Integer [] res = sc.nextInts();
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		for (int i : rep(T))
			res[Q[i]-1] *= -1;

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : sep(N))
			if (!L.isEmpty() && L.peekFirst().equals(res[i])) {
				L.removeFirst();
				res[i] = -abs(res[i]);
			} else
				L.addFirst(abs(res[i]));

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		exit(res);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;

public class C {

	final static boolean autoflush = false;

	public C () {
		int N = sc.nextInt();
		int [] P = new int [N];
		for (int i = N-1; i >= 0; --i)
			P[i] = sc.nextInt();
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		int [] C = new int [N];
		for (int i = 0; i < T; ++i)
			C[N - Q[i]] = 1;

		int [] K = new int [N]; int Z = 0;
		Map<Integer, Integer> Y = new HashMap<Integer, Integer>();
		for (int i = 0; i < N; ++i) {
			if (!Y.containsKey(P[i])) {
				Y.put(P[i], Z);
				K[Z] = P[i]; ++Z;
			}
			P[i] = Y.get(P[i]);
		}

		int [] W = new int [N], L = new int [N]; int M = -1;
		for (int i = 0; i < N; ++i) {
			int p = P[i], s = C[i], w = W[p];
			boolean close = M >= 0 && L[M] == p && s == 0 && w > 0;
			if (close) {
				--M;
				--W[p];
				C[i] = -1;
			} else {
				L[++M] = p;
				++W[p];
				C[i] = 1;
			}
		}

		if (M >= 0)
			exit("NO");

		print("YES");
		int [] res = new int [N];
		for (int i = 0; i < N; ++i)
			res[N-1-i] = -K[P[i]] * C[i];

		StringBuilder S = new StringBuilder(); S.append(res[0]);
		for (int i = 1; i < N; ++i)
			S.append(" " + res[i]);

	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.*;
import java.util.*;

public class cf286c {
  public static void main(String[] args) {
    FastIO in = new FastIO(), out = in;
    int n = in.nextInt();
    if(n%2 == 1) {
      out.println("NO");
      out.close();
      return;
    }
    Integer[] v = new Integer[n];
    for(int i=0; i<n; i++) v[i] = in.nextInt();
    Arrays.sort(v);
    for(int i=0; i<n; i+=2)
      if(v[i] != v[i+1]) {
        out.println("NO");
        out.close();
        return;
      }
    int cur = 0;
    int m = in.nextInt();
    boolean[] forceNeg = new boolean[n];
    for(int i=0; i<m; i++)
      forceNeg[in.nextInt()-1] = true;
    int[] ans = new int[n];
    Stack<Integer> stk = new Stack<Integer>();
    boolean fail = false;
    for(int i=0; i<n; i++) {
      stk.add(i);
      if(forceNeg[i]) {
        if(stk.size() < 2) {
          fail = true;
          break;
        }
        ans[stk.pop()] = -v[cur++];
        ans[stk.pop()] = v[cur++];
      }
    }
    for(int i=0; i<n; i++)
      if(ans[i] == 0) {
        if(cur == n) fail = true;
        else {
          if(cur % 2 == 0)
            ans[i] = v[cur++];
          else
            ans[i] = -v[cur++];
        }
      }
    if(fail) {
      out.println("NO");
    }
    else {
      out.println("YES");
      for(int x : ans) out.print(x+" ");
    }
    out.close();
  }

  static class FastIO extends PrintWriter {
    BufferedReader br;
    StringTokenizer st;

    public FastIO() {
      this(System.in, System.out);
    }

    public FastIO(InputStream in, OutputStream out) {
      super(new BufferedWriter(new OutputStreamWriter(out)));
      br = new BufferedReader(new InputStreamReader(in));
      scanLine();
    }

    public void scanLine() {
      try {
        st = new StringTokenizer(br.readLine().trim());
      } catch (Exception e) {
        throw new RuntimeException(e.getMessage());
      }
    }

    public int numTokens() {
      if (!st.hasMoreTokens()) {
        scanLine();
        return numTokens();
      }
      return st.countTokens();
    }

    public String next() {
      if (!st.hasMoreTokens()) {
        scanLine();
        return next();
      }
      return st.nextToken();
    }

    public double nextDouble() {
      return Double.parseDouble(next());
    }

    public long nextLong() {
      return Long.parseLong(next());
    }

    public int nextInt() {
      return Integer.parseInt(next());
    }
  }
}

import java.io.*;
import java.math.*;
import static java.lang.Math.*;
import java.security.SecureRandom;
import static java.util.Arrays.*;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import sun.misc.Regexp;
import java.awt.geom.*;
import sun.net.www.content.text.plain;

public class Main {

    public static void main(String[] args) throws IOException {
        new Main().run();
    }
    StreamTokenizer in;
    PrintWriter out;
//deb////////////////////////////////////////////////

    public static void deb(String n, Object n1) {
        System.out.println(n + " is : " + n1);
    }

    public static void deb(int[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(boolean[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(double[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(String[] A) {

        for (Object oo : A) {
            System.out.print(oo + " ");
        }
        System.out.println("");
    }

    public static void deb(int[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }

    public static void deb(double[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }

    public static void deb(long[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }

    public static void deb(String[][] A) {
        for (int i = 0; i < A.length; i++) {
            for (Object oo : A[i]) {
                System.out.print(oo + " ");
            }
            System.out.println("");
        }

    }
    /////////////////////////////////////////////////////////////

    int nextInt() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }

    long nextLong() throws IOException {
        in.nextToken();
        return (long) in.nval;
    }

    void run() throws IOException {
//          in = new StreamTokenizer(new BufferedReader(new FileReader("input.txt")));
        // out = new PrintWriter(new FileWriter("output.txt"));
        in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(new OutputStreamWriter(System.out));
        solve();
        out.flush();
    }

    @SuppressWarnings("unchecked")
    void solve() throws IOException {
        //   BufferedReader re= new BufferedReader(new FileReader("C:\\Users\\ASELA\\Desktop\\PROBLEMSET\\input\\F\\10.in"));
        //   BufferedReader re= new BufferedReader(new InputStreamReader(System.in));
        int n = nextInt();
        int[] A = new int[n];
        for (int i = 0; i < n; i++) {
            A[i] = nextInt();
        }
        int k = nextInt();
        for (int i = 0; i < k; i++) {
            int tt = nextInt();
            A[tt - 1] = -A[tt - 1];
        }
        Stack<Integer> st = new Stack<Integer>();
        for (int i = 0; i < n; i++) {
            if (!st.empty()) {
                if (st.peek() == -A[i]) {
                    st.pop();
                } else if (st.peek() == A[i]) {
                    if (A[i] > 0) {
                        st.pop();
                        A[i] = -A[i];
                    }
                } else {
                    st.push(A[i]);
                }
            } else {
                st.push(A[i]);
            }
        }
        if (!st.empty())
        {
         System.out.println("NO");
         return;
        }
        else
        {
            out.println("YES");
            for (int i = 0; i < n; i++) {
                out.print(A[i] + " ");
            }
            out.println("");
        }

    }
}

import java.io.*;
import java.util.*;
import java.math.*;
import java.awt.geom.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

	public void randomShuffle (int n, int a []) {
		Random rnd = new Random();
		for (int i = 1; i < n; i++) {
			int j = rnd.nextInt(i + 1);
			int t = a[j];
			a[j] = a[i];
			a[i] = t;
		}
	}

	int n, N;
	int [] p, ps, mapping, count;

	public void solve() throws Throwable {
		n = sc.nextInt();
		p = new int [n];
		ps = new int [n];
		mapping = new int [n];
		count = new int [n];

		int negativeCount = 0;

		for (int i = 0; i < n; i++) {
			p[i] = sc.nextInt();
			ps[i] = p[i];
		}

		randomShuffle(n, ps);
		Arrays.sort(ps);
		N = 0;
		int pre = -1;
		for (int i = 0; i < n; i++) {
			if (ps[i] != pre) {
				if (pre != -1) {
					if (count[N - 1] % 2 != 0) {
						out.println("NO");
						return;
					} else {
						negativeCount += count[N - 1] / 2;
						count[N - 1] /= 2;
					}
				}
				N++;
				count[N - 1]++;
				mapping[N - 1] = ps[i];
				pre = ps[i];
			} else {
				count[N - 1]++;
				pre = ps[i];
			}
		}

		if (count[N - 1] % 2 != 0) {
			out.println("NO");
			return;
		} else {
			negativeCount += count[N - 1] / 2;
			count[N - 1] /= 2;
		}

		int m = sc.nextInt();
		if (m > negativeCount) {
			out.println("NO");
			return;
		}

		int ans [] = new int [n];

		int stack [] = new int [n];
		boolean neg [] = new boolean [n];
		for (int i = 0; i < m; i++) {
			int pos = sc.nextInt() - 1;
			neg[pos] = true;
		}
		int stackSize = 0;
		int L = 0;

		for (int i = 0; i < n; i++) {
			if (neg[i]) {
				if (stackSize == 0) {
					out.println("NO");
					return;
				}
				while (L + 1 < N && count[L] == 0) L++;
				count[L]--;
				ans[i] = -mapping[L];
				ans[stack[stackSize - 1]] = mapping[L];
				stackSize--;
			} else {
				stack[stackSize++] = i;
			}
		}

		for (int i = 0; i < stackSize; i += 2) {
			while (L + 1 < N && count[L] == 0) L++;
			count[L]--;
			ans[stack[i]] = mapping[L];
			ans[stack[i + 1]] = -mapping[L];
		}

		out.println("YES");
		for (int i = 0; i < n; i++) {
			out.print(ans[i]+" ");
		}

	}

	BufferedReader in;
	PrintWriter out;
	FastScanner sc;

	static Throwable uncaught;

	@Override
	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			sc = new FastScanner(in);
			solve();
		} catch (Throwable t) {
			Solution.uncaught = t;
		} finally {
			out.close();
		}
	}

	public static void main(String[] args) throws Throwable {
		Thread t = new Thread(null, new Solution(), "", (1 << 26));
		t.start();
		t.join();
		if (uncaught != null) {
			throw uncaught;
		}
	}

}

class FastScanner {

	BufferedReader reader;
	StringTokenizer strTok;

	public FastScanner(BufferedReader reader) {
		this.reader = reader;
	}

	public String nextToken() throws IOException {
		while (strTok == null || !strTok.hasMoreTokens()) {
			strTok = new StringTokenizer(reader.readLine().trim());
		}
		return strTok.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

}

import java.io.*;
import java.util.*;
import java.math.*;

public class Main {
	public static void main(String[] args) {
		new Main().run();
	}
	void run() {
		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = in.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; ++i)
			a[i] = in.nextInt();
		int m = in.nextInt();
		for (int i = 0; i < m; ++i) {
			int v = in.nextInt();
			a[v - 1] = -a[v - 1];
		}
		HashMap<Integer, Integer> count = new HashMap<Integer, Integer>();
		for (int i = 0; i < n; ++i)
			count.put(Math.abs(a[i]), 0);
		int[] val = new int[n];
		for (int i = n - 1; i >= 0; --i) {
			val[i] = count.get(Math.abs(a[i]));
			if (val[i] > 0)
				val[i] = 0;
			if (a[i] < 0)
				count.put(-a[i], val[i] - 1);
			else
				count.put(a[i], val[i] + 1);
		}

		int[] stack = new int[n];
		int top = 0;
		count.clear();
		for (int i = 0; i < n; ++i)
			count.put(Math.abs(a[i]), 0);
		for (int i = 0; i < n; ++i) {
			if (a[i] < 0) {
				if (top == 0 || stack[top - 1] != -a[i]) {
					out.println("NO");
					out.close();
					return;
				}
				else {
					--top;
					int v = count.get(-a[i]);
					count.put(-a[i], v - 1);
				}
			}
			else {
				int v = count.get(a[i]);
				if (top == 0 || stack[top - 1] != a[i] || v - 1 + val[i] < 0) {
					stack[top++] = a[i];
					count.put(a[i], v + 1);
				}
				else {
					--top;
					a[i] = -a[i];
					count.put(a[i], v - 1);
				}
			}
		}

		if (top > 0) {
			out.println("NO");
		}
		else {
			out.println("YES");
			for (int i = 0; i < n; ++i)
				out.print(a[i] + " ");
			out.println();
		}
		out.close();
	}
}

class InputReader {
	BufferedReader buff;
	StringTokenizer tokenizer;

	InputReader(InputStream stream) {
		buff = new BufferedReader(new InputStreamReader(stream));
		tokenizer = null;
	}
	boolean hasNext() {
		while (tokenizer == null || !tokenizer.hasMoreTokens())
			try {
				tokenizer = new StringTokenizer(buff.readLine());
			}
			catch (Exception e) {
				return false;
			}
		return true;
	}
	String next() {
		if (!hasNext())
			throw new RuntimeException();
		return tokenizer.nextToken();
	}
	int nextInt() { return Integer.parseInt(next()); }
	long nextLong() { return Long.parseLong(next()); }
}

import java.io.*;
import java.util.*;

public class C {
	public static void main(String[] args) {
		new C().run();
	}

	BufferedReader br;
	StringTokenizer in;
	PrintWriter out;

	public String nextToken() throws IOException {
		while (in == null || !in.hasMoreTokens()) {
			in = new StringTokenizer(br.readLine());
		}
		return in.nextToken();
	}

	public int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	public void solve() throws IOException {
		int n = nextInt();

		if (n % 2 != 0) {
			out.println("NO");
			return;
		}

		int[] ans = new int[n];

		int[] p = new int[n / 2];
		int[] c = new int[n];
		int l = 0;
		for (int i = 0; i < n; i++) {
			int z = nextInt();
			c[z]++;
			if (c[z] % 2 == 0) {
				p[l++] = z;
			}
		}

		int m = nextInt();
		if (m > n / 2 || l != n / 2) {
			out.println("NO");
			return;
		}

		l = 0;
		for (int i = 0; i < m; i++) {
			ans[nextInt() - 1] = -p[l++];
		}

		for (int i = ans.length - 1; i >= 0 && l < n / 2; i--) {
			if (ans[i] == 0) {
				ans[i] = -p[l++];
			}
		}

		Stack<Integer> stack = new Stack<>();

		for (int i = ans.length - 1; i >= 0; i--) {
			if (ans[i] < 0) {
				stack.add(-ans[i]);
			} else {
				if (stack.size() == 0) {
					out.println("NO");
					return;
				}
				ans[i] = stack.pop();
			}
		}

		out.println("YES");
		for (int i = 0; i < ans.length; i++) {
			out.print(ans[i] + " ");
		}
	}

	public void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

import static java.util.Arrays.binarySearch;
import static java.util.Arrays.deepToString;
import static java.util.Arrays.sort;

import java.io.*;
import java.math.*;
import java.util.*;

public class C {

	static boolean debug = false;

	static void solve() {
		int n = debug ? 1000000 : nextInt();
		int[] p = new int[n];
		int[] who = new int[n];
		for (int i = 0; i < n; i++) {
			p[i] = debug ? i / 100 + 1 : nextInt();
			who[i] = p[i];
		}
		sort(who);
		int[] cnt = new int[n];
		int[] pi = new int[n];
		for (int i = 0; i < n; i++) {
			pi[i] = binarySearch(who, p[i]);
			cnt[pi[i]]++;
		}
		for (int i = 0; i < n; i++) {
			if ((cnt[i] & 1) != 0) {
				writer.println("NO");
				return;
			}
			cnt[i] /= 2;
		}
		boolean[] negative = new boolean[n];
		int t = debug ? 0 : nextInt();
		for (int i = 0; i < t; i++) {
			negative[nextInt() - 1] = true;
		}
		int[] stack = new int[n];
		int size = 0;
		for (int i = 0; i < n; i++) {
			int put = -1;
			if (!negative[i] && cnt[pi[i]] > 0) {
				put = p[i];
				cnt[pi[i]]--;
			} else {
				negative[i] = true;
				put = -p[i];
			}
			if (put > 0) {
				stack[size++] = put;
			} else {
				if (size == 0 || stack[size - 1] != -put) {
					writer.println("NO");
					return;
				}
				size--;
			}
		}
		if (!debug) {
			writer.println("YES");
			for (int i = 0; i < n; i++) {
				writer.print((negative[i] ? -p[i] : p[i]) + " ");
			}
		}
	}

	public static void main(String[] args) throws Exception {
		reader = new BufferedReader(new InputStreamReader(System.in));
		writer = new PrintWriter(System.out);
		Locale.setDefault(Locale.US);

		setTime();
		solve();
		printTime();
		printMemory();

		writer.close();
	}

	static BufferedReader reader;
	static PrintWriter writer;
	static StringTokenizer tok = new StringTokenizer("");
	static long systemTime;

	static void debug(Object... o) {
		System.err.println(deepToString(o));
	}

	static void setTime() {
		systemTime = System.currentTimeMillis();
	}

	static void printTime() {
		System.err.println("Time consumed: " + (System.currentTimeMillis() - systemTime));
	}

	static void printMemory() {
		System.err.println("Memory consumed: "
				+ (Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1000 + "kb");
	}

	static String next() {
		while (!tok.hasMoreTokens()) {
			String w = null;
			try {
				w = reader.readLine();
			} catch (Exception e) {
				e.printStackTrace();
			}
			if (w == null)
				return null;
			tok = new StringTokenizer(w);
		}
		return tok.nextToken();
	}

	static int nextInt() {
		return Integer.parseInt(next());
	}

	static long nextLong() {
		return Long.parseLong(next());
	}

	static double nextDouble() {
		return Double.parseDouble(next());
	}

	static BigInteger nextBigInteger() {
		return new BigInteger(next());
	}
}

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.Hashtable;
import java.util.Stack;
import java.util.Vector;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Lokesh Khandelwal
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
    public void solve(int testNumber, InputReader in, OutputWriter out) {
        int n=in.nextInt(),i;
        int a[]=new int[n];
        for(i=0;i<n;i++)
            a[i]=in.nextInt();
        int t=in.nextInt();
        Hashtable<Integer,Integer> table=new Hashtable<Integer, Integer>(n);
        for(i=0;i<t;i++)
        {
            int q=in.nextInt();
            //a[q-1]*=-1;
            if(table.containsKey(a[q-1]))
                table.put(a[q-1],table.get(a[q-1])+1);
            else table.put(a[q-1],1);
        }

        Stack<Integer> stack=new Stack<Integer>();
        boolean status=true;
        int b[]=new int[n];
        for(i=0;i<n;i++)
        {
            if(!stack.isEmpty())
            {
                int p=stack.peek();
                if(a[i]!=p)
                {
                    stack.push(a[i]);
                    continue;
                }
                int q=0;
                if(table.containsKey(p))
                    q=table.get(p);
                if(q>1)
                {
                    stack.push(a[i]);
                    table.put(a[i],q-1);
                }
                else
                {
                    stack.pop();
                    a[i]*=-1;
                }
            }
            else stack.push(a[i]);
            //DebugUtils.print(stack);
        }
        if(!stack.isEmpty())
            status=false;
        if(!status)
        {
            out.printLine("NO");
        }
        else
        {
            out.printLine("YES");
            for(i=0;i<n-1;i++)
                out.print(a[i]+" ");
            out.printLine(a[i]);
        }
    }
}

class InputReader
{
    BufferedReader in;
    StringTokenizer tokenizer=null;

    public InputReader(InputStream inputStream)
    {
        in=new BufferedReader(new InputStreamReader(inputStream));
    }
    public String next()
    {
        try{
            while (tokenizer==null||!tokenizer.hasMoreTokens())
            {
                tokenizer=new StringTokenizer(in.readLine());
            }
            return tokenizer.nextToken();
        }
        catch (IOException e)
        {
            return null;
        }
    }
    public int nextInt()
    {
        return Integer.parseInt(next());
    }
    }

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}
}

import static java.lang.Math.*;
import static java.math.BigInteger.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;

import java.util.*;
import java.util.Map.Entry;

public class C {

	final static boolean autoflush = false;

	final static int MOD = (int) 1e9 + 7;
	final static double eps = 1e-9;
	final static int INF = (int) 1e9;

	public C () {
		int N = sc.nextInt();
		Integer [] P = sc.nextInts();
		int T = sc.nextInt();
		Integer [] Q = sc.nextInt(T);

		int [] C = new int [N]; fill(C, 1);
		for (int i : rep(T))
			C[Q[i] - 1] = -1;

		Counter<Integer> W = new Counter<Integer>();
		int [] B = new int [N];

		for (int i : sep(N)) {
			Integer p = P[i];
			if (C[i] == -1 || (B[i] = W.get(p)) == 0)
				W.inc(p);
			else
				W.dec(p);
		}

		for (Integer p : P)
			if (W.get(p) != 0)
				exit("NO");

		Deque<Integer> L = new LinkedList<Integer>();
		for (int i : rep(N)) {
			int p = P[i], s = C[i], w = W.get(p);
			boolean close = !L.isEmpty() && L.peekFirst() == p && w > B[i];
			if (s == -1 && !close)
				exit("NO");
			if (close) {
				L.removeFirst();
				W.dec(p);
				C[i] = -1;
			} else {
				L.addFirst(p);
				W.inc(p);
			}
		}

		if (!L.isEmpty())
			exit("NO");

		print("YES");
		int [] res = new int [N];
		for (int i : rep(N))
			res[i] = P[i] * C[i];
		exit(res);
	}

	static class Counter<T> extends TreeMap<T, Integer> {
		private static final long serialVersionUID = 1L;

		public Integer get(Object key) {
			return containsKey(key) ? super.get(key) : 0;
		}

		public void inc(T key) {
			inc(key, 1);
		}

		public void dec(T key) {
			inc(key, -1);
		}

		public void inc(T key, int D) {
			super.put(key, D + get(key));
		}

		public Entry<T, Integer> max() {
			Entry<T, Integer> max = null;
			for (Entry<T, Integer> x : entrySet())
				if (max == null || x.getValue() > max.getValue())
					max = x;
			return max;
		}

		public Integer put(T key, Integer value) {
			throw new UnsupportedOperationException();
		}
	}

	////////////////////////////////////////////////////////////////////////////////////

	static int [] rep(int N) { return rep(0, N); }
	static int [] rep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[i-S] = i; return res; }
	static int [] req(int S, int T) { return rep(S, T+1); }

	static int [] sep(int N) { return sep(0, N); }
	static int [] sep(int S, int T) { int [] res = new int [max(T-S, 0)]; for (int i = S; i < T; ++i) res[T-i-1] = i; return res; }
	static int [] seq(int S, int T) { return sep(S, T+1); }

	////////////////////////////////////////////////////////////////////////////////////

	/* Dear hacker, don't bother reading below this line, unless you want to help me debug my I/O routines :-) */

	final static MyScanner sc = new MyScanner();

	static class MyScanner {
		public String next() {
			newLine();
			return line[index++];
		}

		public char nextChar() {
			return next().charAt(0);
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public String nextLine() {
			line = null;
			return readLine();
		}

		public String [] nextStrings() {
			line = null;
			return readLine().split(" ");
		}

		public char [] nextChars() {
			return next ().toCharArray ();
		}

		public Integer [] nextInts() {
			String [] L = nextStrings();
			Integer [] res = new Integer [L.length];
			for (int i : rep(L.length))
				res[i] = Integer.parseInt(L[i]);
			return res;
		}

		public Long [] nextLongs() {
			String [] L = nextStrings();
			Long [] res = new Long [L.length];
			for (int i : rep(L.length))
				res[i] = Long.parseLong(L[i]);
			return res;
		}

		public Double [] nextDoubles() {
			String [] L = nextStrings();
			Double [] res = new Double [L.length];
			for (int i : rep(L.length))
				res[i] = Double.parseDouble(L[i]);
			return res;
		}

		public String [] next (int N) {
			String [] res = new String [N];
			for (int i : rep(N))
				res[i] = sc.next();
			return res;
		}

		public Integer [] nextInt (int N) {
			Integer [] res = new Integer [N];
			for (int i : rep(N))
				res[i] = sc.nextInt();
			return res;
		}

		public Long [] nextLong (int N) {
			Long [] res = new Long [N];
			for (int i : rep(N))
				res[i] = sc.nextLong();
			return res;
		}

		public Double [] nextDouble (int N) {
			Double [] res = new Double [N];
			for (int i : rep(N))
				res[i] = sc.nextDouble();
			return res;
		}

		public String [][] nextStrings (int N) {
			String [][] res = new String [N][];
			for (int i : rep(N))
				res[i] = sc.nextStrings();
			return res;
		}

		public Integer [][] nextInts (int N) {
			Integer [][] res = new Integer [N][];
			for (int i : rep(N))
				res[i] = sc.nextInts();
			return res;
		}

		public Long [][] nextLongs (int N) {
			Long [][] res = new Long [N][];
			for (int i : rep(N))
				res[i] = sc.nextLongs();
			return res;
		}

		public Double [][] nextDoubles (int N) {
			Double [][] res = new Double [N][];
			for (int i : rep(N))
				res[i] = sc.nextDoubles();
			return res;
		}

		//////////////////////////////////////////////

		private boolean eol() {
			return index == line.length;
		}

		private String readLine() {
			try {
				return r.readLine();
			} catch (Exception e) {
				throw new Error (e);
			}
		}
		private final java.io.BufferedReader r;

		MyScanner () {
			this(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)));
		}

		MyScanner (java.io.BufferedReader r) {
			try {
				this.r = r;
				while (!r.ready())
					Thread.sleep(1);
				start();
			} catch (Exception e) {
				throw new Error(e);
			}
		}

		private String [] line;
		private int index;

		private void newLine() {
			if (line == null || eol()) {
				line = readLine().split(" ");
				index = 0;
			}
		}
	}

	static void print (Object o, Object... a) {
		printDelim(" ", o, a);
	}

	static void cprint (Object o, Object... a) {
		printDelim("", o, a);
	}

	static void printDelim (String delim, Object o, Object... a) {
		pw.println(build(delim, o, a));
	}

	static void exit (Object o, Object... a) {
		print(o, a);
		exit();
	}

	static void exit() {
		pw.close();
		System.out.flush();
		System.err.println("------------------");
		System.err.println("Time: " + ((millis() - t) / 1000.0));
		System.exit(0);
	}

	static void NO() {
		throw new Error("NO!");
	}

	////////////////////////////////////////////////////////////////////////////////////

	static String build (String delim, Object o, Object... a) {
		StringBuilder b = new StringBuilder();
		append(b, o, delim);
		for (Object p : a)
			append(b, p, delim);
		return b.toString().trim();
	}

	static void append(StringBuilder b, Object o, String delim) {
		if (o.getClass().isArray()) {
			int L = java.lang.reflect.Array.getLength(o);
			for (int i : rep(L))
				append(b, java.lang.reflect.Array.get(o, i), delim);
		} else if (o instanceof Iterable<?>)
			for (Object p : (Iterable<?>)o)
				append(b, p, delim);
		else
			b.append(delim).append(o);
	}

	////////////////////////////////////////////////////////////////////////////////////

	static void statics() {
		abs(0);
		valueOf(0);
		asList(new Object [0]);
		reverseOrder();
	}

	public static void main (String[] args) {
		new C();
		exit();
	}

	static void start() {
		t = millis();
	}

	static java.io.PrintWriter pw = new java.io.PrintWriter(System.out, autoflush);

	static long t;

	static long millis() {
		return System.currentTimeMillis();
	}
}

import java.io.*;
import java.util.*;
/*
 * Heart beats fast
 * 		Colors and promises
 * 			How to be brave
 * 				How can I love when I am afraid...
 */
//read the question correctly (is y a vowel? what are the exact constraints?)
//look out for SPECIAL CASES (n=1?) and overflow (ll vs int?)
//always declare multidimensional arrays as [2][n] not [n][2]
//it can lead to upto 2-3x diff in runtime
//declare int/long tries with 16 array size due to object overhead :D
public class Main
{
	static node[]gra;
	public static void main(String[] args) throws Exception
	{
		int n=ni();
		int[]p=nia(n);
		Map<Integer,Integer> ct=new HashMap<Integer,Integer>();
		for(int i:p)
			ct.put(i, ct.getOrDefault(i, 0)+1);
//		for(int i:ct.values())
//			if(i%2!=0)
//			{
//				sop("NO");
//				exit();
//			}
		Map<Integer,Integer> count=new HashMap<Integer,Integer>();
		int t=ni();
		Set<Integer> bad=new HashSet<Integer>();
		for(int i=0; i<t; i++)
			bad.add(ni()-1);
		Stack<Integer> hola=new Stack<Integer>();
		boolean evildead=false;
		for(int i=0; i<n; i++)
		{
			if(!evildead&&bad.contains(i)&&(!hola.isEmpty())&&hola.peek()==p[i])
			{
				evildead=true;
				count.replace(p[i], count.get(p[i])-1);
				p[i]*=-1;
				hola.pop();
			}
			else if(count.getOrDefault(p[i],0)<ct.get(p[i]))
			{
				count.put(p[i], count.getOrDefault(p[i],0)+1);
				hola.add(p[i]);
			}
			else if(hola.peek()==p[i])
			{
				count.replace(p[i], count.get(p[i])-1);
				p[i]*=-1;
				hola.pop();
			}
			else
			{
				sop("NO");
				exit();
			}
			ct.replace(Math.abs(p[i]), ct.get(Math.abs(p[i]))-1);
		}
		if(hola.isEmpty())
		{
			sop("YES");
			pra(p);
		}
		else
			sop("NO");
		System.out.print(output);
	}
	static class node
	{
		vector adj=new vector();
	}
	///////////////////////////////////////////
	///////////////////////////////////////////
	///template from here
	static class pair
	{
		int a, b;
		pair(){}
		pair(int c,int d){a=c;b=d;}
	}
	static interface combiner
	{
		public long combine(long a, long b);
	}
	static final int mod=1000000007;
	static final double eps=1e-9;
	static final long inf=100000000000000000L;
	static Reader in=new Reader();
	static StringBuilder output=new StringBuilder();
	static Random rn=new Random();
	static void reverse(int[]a){for(int i=0; i<a.length/2; i++){a[i]^=a[a.length-i-1];a[a.length-i-1]^=a[i];a[i]^=a[a.length-i-1];}}
	static void sort(int[]a)
	{
		int te;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
				a[i]^=a[te];
				a[te]^=a[i];
				a[i]^=a[te];
			}
		}
		Arrays.sort(a);
	}
	static void sort(long[]a)
	{
		int te;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
			a[i]^=a[te];
			a[te]^=a[i];
			a[i]^=a[te];
			}
		}
		Arrays.sort(a);
	}
	static void sort(double[]a)
	{
		int te;
		double te1;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
			te1=a[te];
			a[te]=a[i];
			a[i]=te1;
			}
		}
		Arrays.sort(a);
	}
	static void sort(int[][]a)
	{
		Arrays.sort(a, new Comparator<int[]>()
		{
			public int compare(int[]a,int[]b)
			{
				if(a[0]>b[0])
					return -1;
				if(b[0]>a[0])
					return 1;
				return 0;
			}
		});
	}
	static void sort(pair[]a)
	{
		Arrays.sort(a,new Comparator<pair>()
				{
			@Override
			public int compare(pair a,pair b)
			{
				if(a.a>b.a)
					return 1;
				if(b.a>a.a)
				return -1;
				return 0;
			}
				});
	}
	static int log2n(long a)
	{
		int te=0;
		while(a>0)
		{
			a>>=1;
			++te;
		}
		return te;
	}
	static class vector implements Iterable<Integer>
	{
		int a[],size;
		vector(){a=new int[10];size=0;}
		vector(int n){a=new int[n];size=0;}
		public void add(int b){if(++size==a.length)a=Arrays.copyOf(a, 2*size);a[size-1]=b;}
		public void sort(){Arrays.sort(a, 0, size);}
		public void sort(int l, int r){Arrays.sort(a, l, r);}
		@Override
		public Iterator<Integer> iterator() {
			Iterator<Integer> hola=new Iterator<Integer>()
					{
				int cur=0;
						@Override
						public boolean hasNext() {
							return cur<size;
						}
						@Override
						public Integer next() {
							return a[cur++];
						}
					};
			return hola;
		}
	}
	//output functions////////////////
	static void pr(Object a){output.append(a+"\n");}
	static void pr(){output.append("\n");}
	static void p(Object a){output.append(a);}
	static void pra(int[]a){for(int i:a)output.append(i+" ");output.append("\n");}
	static void pra(long[]a){for(long i:a)output.append(i+" ");output.append("\n");}
	static void pra(String[]a){for(String i:a)output.append(i+" ");output.append("\n");}
	static void pra(double[]a){for(double i:a)output.append(i+" ");output.append("\n");}
	static void sop(Object a){System.out.println(a);}
	static void flush(){System.out.println(output);output=new StringBuilder();}
	//////////////////////////////////
	//input functions/////////////////
	static int ni(){return Integer.parseInt(in.next());}
	static long nl(){return Long.parseLong(in.next());}
	static String ns(){return in.next();}
	static double nd(){return Double.parseDouble(in.next());}
	static int[] nia(int n){int a[]=new int[n];for(int i=0; i<n; i++)a[i]=ni();return a;}
	static int[] pnia(int n){int a[]=new int[n+1];for(int i=1; i<=n; i++)a[i]=ni();return a;}
	static long[] nla(int n){long a[]=new long[n];for(int i=0; i<n; i++)a[i]=nl();return a;}
	static String[] nsa(int n){String a[]=new String[n];for(int i=0; i<n; i++)a[i]=ns();return a;}
	static double[] nda(int n){double a[]=new double[n];for(int i=0; i<n; i++)a[i]=nd();return a;}
	//////////////////////////////////
	//some utility functions
	static void exit(){System.out.print(output);System.exit(0);}
	static int min(int... a){int min=a[0];for(int i:a)min=Math.min(min, i);return min;}
	static int max(int... a){int max=a[0];for(int i:a)max=Math.max(max, i);return max;}
	static int gcd(int... a){int gcd=a[0];for(int i:a)gcd=gcd(gcd, i);return gcd;}
	static long min(long... a){long min=a[0];for(long i:a)min=Math.min(min, i);return min;}
	static long max(long... a){long max=a[0];for(long i:a)max=Math.max(max, i);return max;}
	static long gcd(long... a){long gcd=a[0];for(long i:a)gcd=gcd(gcd, i);return gcd;}
	static String pr(String a, long b){String c="";while(b>0){if(b%2==1)c=c.concat(a);a=a.concat(a);b>>=1;}return c;}
	static long powm(long a, long b, long m){long an=1;long c=a;while(b>0){if(b%2==1)an=(an*c)%m;c=(c*c)%m;b>>=1;}return an;}
	static int gcd(int a, int b){if(b==0)return a;return gcd(b, a%b);}
	static long gcd(long a, long b){if(b==0)return a;return gcd(b, a%b);}
	static class Reader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        public Reader() {
            reader = new BufferedReader(new InputStreamReader(System.in), 32768);
            tokenizer = null;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
    }
}

import java.io.*;
import java.util.*;
/*
 * Heart beats fast
 * 		Colors and promises
 * 			How to be brave
 * 				How can I love when I am afraid...
 */
//read the question correctly (is y a vowel? what are the exact constraints?)
//look out for SPECIAL CASES (n=1?) and overflow (ll vs int?)
//always declare multidimensional arrays as [2][n] not [n][2]
//it can lead to upto 2-3x diff in runtime
//declare int/long tries with 16 array size due to object overhead :D
public class Main
{
	static node[]gra;
	public static void main(String[] args) throws Exception
	{
		int n=ni();
		int[]p=nia(n);
		Map<Integer,Integer> ct=new HashMap<Integer,Integer>();
		for(int i:p)
			ct.put(i, ct.getOrDefault(i, 0)+1);
		int t=ni();
		while(t-->0)
			p[ni()-1]*=-1;
		Stack<Integer> lol=new Stack<Integer>();
		Map<Integer,Integer> count=new HashMap<Integer,Integer>();
		for(int i=0; i<n; i++)
		{
			if(p[i]>0)
			{
				if(count.getOrDefault(p[i],0)<ct.get(p[i]))
				{
					lol.add(p[i]);
					count.put(p[i], count.getOrDefault(p[i],0)+1);
				}
				else if(lol.peek()==p[i])
				{
					count.put(p[i], count.getOrDefault(p[i],0)-1);
					p[i]*=-1;
					lol.pop();
				}
				else
				{
					sop("NO");
					exit();
				}
			}
			else
			{
				if(lol.peek()==-p[i])
				{
					count.put(-p[i], count.getOrDefault(-p[i],0)-1);
					lol.pop();
				}
				else
				{
					sop("NO");
					exit();
				}
			}
			ct.replace(Math.abs(p[i]),ct.get(Math.abs(p[i]))-1);
		}
		if(lol.empty())
		{
			sop("YES");
			pra(p);
		}
		else
		{
			sop("NO");
		}
		System.out.print(output);
	}
	static class node
	{
		vector adj=new vector();
	}
	///////////////////////////////////////////
	///////////////////////////////////////////
	///template from here
	static class pair
	{
		int a, b;
		pair(){}
		pair(int c,int d){a=c;b=d;}
	}
	static interface combiner
	{
		public long combine(long a, long b);
	}
	static final int mod=1000000007;
	static final double eps=1e-9;
	static final long inf=100000000000000000L;
	static Reader in=new Reader();
	static StringBuilder output=new StringBuilder();
	static Random rn=new Random();
	static void reverse(int[]a){for(int i=0; i<a.length/2; i++){a[i]^=a[a.length-i-1];a[a.length-i-1]^=a[i];a[i]^=a[a.length-i-1];}}
	static void sort(int[]a)
	{
		int te;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
				a[i]^=a[te];
				a[te]^=a[i];
				a[i]^=a[te];
			}
		}
		Arrays.sort(a);
	}
	static void sort(long[]a)
	{
		int te;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
			a[i]^=a[te];
			a[te]^=a[i];
			a[i]^=a[te];
			}
		}
		Arrays.sort(a);
	}
	static void sort(double[]a)
	{
		int te;
		double te1;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
			te1=a[te];
			a[te]=a[i];
			a[i]=te1;
			}
		}
		Arrays.sort(a);
	}
	static void sort(int[][]a)
	{
		Arrays.sort(a, new Comparator<int[]>()
		{
			public int compare(int[]a,int[]b)
			{
				if(a[0]>b[0])
					return -1;
				if(b[0]>a[0])
					return 1;
				return 0;
			}
		});
	}
	static void sort(pair[]a)
	{
		Arrays.sort(a,new Comparator<pair>()
				{
			@Override
			public int compare(pair a,pair b)
			{
				if(a.a>b.a)
					return 1;
				if(b.a>a.a)
				return -1;
				return 0;
			}
				});
	}
	static int log2n(long a)
	{
		int te=0;
		while(a>0)
		{
			a>>=1;
			++te;
		}
		return te;
	}
	static class vector implements Iterable<Integer>
	{
		int a[],size;
		vector(){a=new int[10];size=0;}
		vector(int n){a=new int[n];size=0;}
		public void add(int b){if(++size==a.length)a=Arrays.copyOf(a, 2*size);a[size-1]=b;}
		public void sort(){Arrays.sort(a, 0, size);}
		public void sort(int l, int r){Arrays.sort(a, l, r);}
		@Override
		public Iterator<Integer> iterator() {
			Iterator<Integer> hola=new Iterator<Integer>()
					{
				int cur=0;
						@Override
						public boolean hasNext() {
							return cur<size;
						}
						@Override
						public Integer next() {
							return a[cur++];
						}
					};
			return hola;
		}
	}
	//output functions////////////////
	static void pr(Object a){output.append(a+"\n");}
	static void pr(){output.append("\n");}
	static void p(Object a){output.append(a);}
	static void pra(int[]a){for(int i:a)output.append(i+" ");output.append("\n");}
	static void pra(long[]a){for(long i:a)output.append(i+" ");output.append("\n");}
	static void pra(String[]a){for(String i:a)output.append(i+" ");output.append("\n");}
	static void pra(double[]a){for(double i:a)output.append(i+" ");output.append("\n");}
	static void sop(Object a){System.out.println(a);}
	static void flush(){System.out.println(output);output=new StringBuilder();}
	//////////////////////////////////
	//input functions/////////////////
	static int ni(){return Integer.parseInt(in.next());}
	static long nl(){return Long.parseLong(in.next());}
	static String ns(){return in.next();}
	static double nd(){return Double.parseDouble(in.next());}
	static int[] nia(int n){int a[]=new int[n];for(int i=0; i<n; i++)a[i]=ni();return a;}
	static int[] pnia(int n){int a[]=new int[n+1];for(int i=1; i<=n; i++)a[i]=ni();return a;}
	static long[] nla(int n){long a[]=new long[n];for(int i=0; i<n; i++)a[i]=nl();return a;}
	static String[] nsa(int n){String a[]=new String[n];for(int i=0; i<n; i++)a[i]=ns();return a;}
	static double[] nda(int n){double a[]=new double[n];for(int i=0; i<n; i++)a[i]=nd();return a;}
	//////////////////////////////////
	//some utility functions
	static void exit(){System.out.print(output);System.exit(0);}
	static int min(int... a){int min=a[0];for(int i:a)min=Math.min(min, i);return min;}
	static int max(int... a){int max=a[0];for(int i:a)max=Math.max(max, i);return max;}
	static int gcd(int... a){int gcd=a[0];for(int i:a)gcd=gcd(gcd, i);return gcd;}
	static long min(long... a){long min=a[0];for(long i:a)min=Math.min(min, i);return min;}
	static long max(long... a){long max=a[0];for(long i:a)max=Math.max(max, i);return max;}
	static long gcd(long... a){long gcd=a[0];for(long i:a)gcd=gcd(gcd, i);return gcd;}
	static String pr(String a, long b){String c="";while(b>0){if(b%2==1)c=c.concat(a);a=a.concat(a);b>>=1;}return c;}
	static long powm(long a, long b, long m){long an=1;long c=a;while(b>0){if(b%2==1)an=(an*c)%m;c=(c*c)%m;b>>=1;}return an;}
	static int gcd(int a, int b){if(b==0)return a;return gcd(b, a%b);}
	static long gcd(long a, long b){if(b==0)return a;return gcd(b, a%b);}
	static class Reader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        public Reader() {
            reader = new BufferedReader(new InputStreamReader(System.in), 32768);
            tokenizer = null;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
    }
}

import java.io.*;
import java.util.*;
/*
 * Heart beats fast
 * 		Colors and promises
 * 			How to be brave
 * 				How can I love when I am afraid...
 */
//read the question correctly (is y a vowel? what are the exact constraints?)
//look out for SPECIAL CASES (n=1?) and overflow (ll vs int?)
//always declare multidimensional arrays as [2][n] not [n][2]
//it can lead to upto 2-3x diff in runtime
//declare int/long tries with 16 array size due to object overhead :D
public class Main
{
	static node[]gra;
	public static void main(String[] args) throws Exception
	{
		int n=ni();
		int[]p=nia(n);
		Map<Integer,Integer> ct=new HashMap<Integer,Integer>();
		for(int i:p)
			ct.put(i, ct.getOrDefault(i, 0)+1);
		int t=ni();
		while(t-->0)
			p[ni()-1]*=-1;
		Stack<pair> lol=new Stack<pair>();
		Stack<pair> lol2=new Stack<pair>();
		Map<Integer,Integer> count=new HashMap<Integer,Integer>();
		for(int i=0; i<n; i++)
		{
			if(p[i]>0)
			{
				if(count.getOrDefault(p[i],0)<ct.get(p[i]))
				{
					lol.add(new pair(p[i],i));
					count.put(p[i], count.getOrDefault(p[i],0)+1);
				}
				else
				{
					if(lol.isEmpty())
					{
						sop("NO");
						exit();
					}
					while(lol.peek().a!=p[i])
					{
						if(lol.isEmpty())
						{
							sop("NO");
							exit();
						}
						if(lol2.isEmpty()||(lol.peek().a!=lol2.peek().a))
						{
							lol2.push(lol.pop());
						}
						if(lol.isEmpty())
						{
							sop("NO");
							exit();
						}
						if(lol.peek().a==lol2.peek().a)
						{
							p[lol2.pop().b]*=-1;
							count.replace(lol.peek().a,count.get(lol.pop().a)-2);
						}
						if(lol.isEmpty())
						{
							sop("NO");
							exit();
						}
					}
					p[i]*=-1;
					count.replace(lol.peek().a, count.get(lol.pop().a)-1);
				}
			}
			else
			{
				if(lol.peek().a==-p[i])
				{
					count.put(-p[i], count.getOrDefault(-p[i],0)-1);
					lol.pop();
				}
				else
				{
					if(lol.isEmpty())
					{
						sop("NO");
						exit();
					}
					while(lol.peek().a!=-p[i])
					{
						if(lol.isEmpty())
						{
							sop("NO");
							exit();
						}
						if(lol2.isEmpty()||(lol.peek().a!=lol2.peek().a))
						{
							lol2.push(lol.pop());
						}
						if(lol.isEmpty())
						{
							sop("NO");
							exit();
						}
						if(lol.peek().a==lol2.peek().a)
						{
							p[lol2.pop().b]*=-1;
							count.replace(lol.peek().a,count.get(lol.pop().a)-2);
						}
						if(lol.isEmpty())
						{
							sop("NO");
							exit();
						}
					}
					count.replace(lol.peek().a, count.get(lol.pop().a)-1);
				}
			}
			ct.replace(Math.abs(p[i]),ct.get(Math.abs(p[i]))-1);
		}
		if(lol.empty())
		{
			sop("YES");
			pra(p);
		}
		else
		{
			sop("NO");
		}
		System.out.print(output);
	}
	static class node
	{
		vector adj=new vector();
	}
	///////////////////////////////////////////
	///////////////////////////////////////////
	///template from here
	static class pair
	{
		int a, b;
		pair(){}
		pair(int c,int d){a=c;b=d;}
	}
	static interface combiner
	{
		public long combine(long a, long b);
	}
	static final int mod=1000000007;
	static final double eps=1e-9;
	static final long inf=100000000000000000L;
	static Reader in=new Reader();
	static StringBuilder output=new StringBuilder();
	static Random rn=new Random();
	static void reverse(int[]a){for(int i=0; i<a.length/2; i++){a[i]^=a[a.length-i-1];a[a.length-i-1]^=a[i];a[i]^=a[a.length-i-1];}}
	static void sort(int[]a)
	{
		int te;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
				a[i]^=a[te];
				a[te]^=a[i];
				a[i]^=a[te];
			}
		}
		Arrays.sort(a);
	}
	static void sort(long[]a)
	{
		int te;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
			a[i]^=a[te];
			a[te]^=a[i];
			a[i]^=a[te];
			}
		}
		Arrays.sort(a);
	}
	static void sort(double[]a)
	{
		int te;
		double te1;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
			te1=a[te];
			a[te]=a[i];
			a[i]=te1;
			}
		}
		Arrays.sort(a);
	}
	static void sort(int[][]a)
	{
		Arrays.sort(a, new Comparator<int[]>()
		{
			public int compare(int[]a,int[]b)
			{
				if(a[0]>b[0])
					return -1;
				if(b[0]>a[0])
					return 1;
				return 0;
			}
		});
	}
	static void sort(pair[]a)
	{
		Arrays.sort(a,new Comparator<pair>()
				{
			@Override
			public int compare(pair a,pair b)
			{
				if(a.a>b.a)
					return 1;
				if(b.a>a.a)
				return -1;
				return 0;
			}
				});
	}
	static int log2n(long a)
	{
		int te=0;
		while(a>0)
		{
			a>>=1;
			++te;
		}
		return te;
	}
	static class vector implements Iterable<Integer>
	{
		int a[],size;
		vector(){a=new int[10];size=0;}
		vector(int n){a=new int[n];size=0;}
		public void add(int b){if(++size==a.length)a=Arrays.copyOf(a, 2*size);a[size-1]=b;}
		public void sort(){Arrays.sort(a, 0, size);}
		public void sort(int l, int r){Arrays.sort(a, l, r);}
		@Override
		public Iterator<Integer> iterator() {
			Iterator<Integer> hola=new Iterator<Integer>()
					{
				int cur=0;
						@Override
						public boolean hasNext() {
							return cur<size;
						}
						@Override
						public Integer next() {
							return a[cur++];
						}
					};
			return hola;
		}
	}
	//output functions////////////////
	static void pr(Object a){output.append(a+"\n");}
	static void pr(){output.append("\n");}
	static void p(Object a){output.append(a);}
	static void pra(int[]a){for(int i:a)output.append(i+" ");output.append("\n");}
	static void pra(long[]a){for(long i:a)output.append(i+" ");output.append("\n");}
	static void pra(String[]a){for(String i:a)output.append(i+" ");output.append("\n");}
	static void pra(double[]a){for(double i:a)output.append(i+" ");output.append("\n");}
	static void sop(Object a){System.out.println(a);}
	static void flush(){System.out.println(output);output=new StringBuilder();}
	//////////////////////////////////
	//input functions/////////////////
	static int ni(){return Integer.parseInt(in.next());}
	static long nl(){return Long.parseLong(in.next());}
	static String ns(){return in.next();}
	static double nd(){return Double.parseDouble(in.next());}
	static int[] nia(int n){int a[]=new int[n];for(int i=0; i<n; i++)a[i]=ni();return a;}
	static int[] pnia(int n){int a[]=new int[n+1];for(int i=1; i<=n; i++)a[i]=ni();return a;}
	static long[] nla(int n){long a[]=new long[n];for(int i=0; i<n; i++)a[i]=nl();return a;}
	static String[] nsa(int n){String a[]=new String[n];for(int i=0; i<n; i++)a[i]=ns();return a;}
	static double[] nda(int n){double a[]=new double[n];for(int i=0; i<n; i++)a[i]=nd();return a;}
	//////////////////////////////////
	//some utility functions
	static void exit(){System.out.print(output);System.exit(0);}
	static int min(int... a){int min=a[0];for(int i:a)min=Math.min(min, i);return min;}
	static int max(int... a){int max=a[0];for(int i:a)max=Math.max(max, i);return max;}
	static int gcd(int... a){int gcd=a[0];for(int i:a)gcd=gcd(gcd, i);return gcd;}
	static long min(long... a){long min=a[0];for(long i:a)min=Math.min(min, i);return min;}
	static long max(long... a){long max=a[0];for(long i:a)max=Math.max(max, i);return max;}
	static long gcd(long... a){long gcd=a[0];for(long i:a)gcd=gcd(gcd, i);return gcd;}
	static String pr(String a, long b){String c="";while(b>0){if(b%2==1)c=c.concat(a);a=a.concat(a);b>>=1;}return c;}
	static long powm(long a, long b, long m){long an=1;long c=a;while(b>0){if(b%2==1)an=(an*c)%m;c=(c*c)%m;b>>=1;}return an;}
	static int gcd(int a, int b){if(b==0)return a;return gcd(b, a%b);}
	static long gcd(long a, long b){if(b==0)return a;return gcd(b, a%b);}
	static class Reader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        public Reader() {
            reader = new BufferedReader(new InputStreamReader(System.in), 32768);
            tokenizer = null;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
    }
}

import java.io.*;
import java.util.*;
/*
 * Heart beats fast
 * 		Colors and promises
 * 			How to be brave
 * 				How can I love when I am afraid...
 */
//read the question correctly (is y a vowel? what are the exact constraints?)
//look out for SPECIAL CASES (n=1?) and overflow (ll vs int?)
//always declare multidimensional arrays as [2][n] not [n][2]
//it can lead to upto 2-3x diff in runtime
//declare int/long tries with 16 array size due to object overhead :D
public class Main
{
	static node[]gra;
	public static void main(String[] args) throws Exception
	{
		int n=ni();
		int[]p=nia(n);
		Map<Integer,Integer> ct=new HashMap<Integer,Integer>();
		for(int i:p)
			ct.put(i, ct.getOrDefault(i, 0)+1);
//		for(int i:ct.values())
//			if(i%2!=0)
//			{
//				sop("NO");
//				exit();
//			}
		Map<Integer,Integer> count=new HashMap<Integer,Integer>();
		int t=ni();
		Set<Integer> bad=new HashSet<Integer>();
		for(int i=0; i<t; i++)
			bad.add(ni()-1);
		Stack<Integer> hola=new Stack<Integer>();
		boolean evildead=false;
		for(int i=0; i<n; i++)
		{
			if(!evildead&&bad.contains(i)&&(!hola.isEmpty())&&hola.peek()==p[i])
			{
				evildead=true;
				count.replace(p[i], count.get(p[i])-1);
				p[i]*=-1;
				hola.pop();
			}
			else if(evildead&&(!hola.isEmpty())&&hola.peek()==p[i])
			{
				count.replace(p[i], count.get(p[i])-1);
				p[i]*=-1;
				hola.pop();
			}
			else if(count.getOrDefault(p[i],0)<ct.get(p[i]))
			{
				count.put(p[i], count.getOrDefault(p[i],0)+1);
				hola.add(p[i]);
			}
			else if(hola.peek()==p[i])
			{
				count.replace(p[i], count.get(p[i])-1);
				p[i]*=-1;
				hola.pop();
			}
			else
			{
				sop("NO");
				exit();
			}
			ct.replace(Math.abs(p[i]), ct.get(Math.abs(p[i]))-1);
		}
		if(hola.isEmpty())
		{
			sop("YES");
			pra(p);
		}
		else
			sop("NO");
		System.out.print(output);
	}
	static class node
	{
		vector adj=new vector();
	}
	///////////////////////////////////////////
	///////////////////////////////////////////
	///template from here
	static class pair
	{
		int a, b;
		pair(){}
		pair(int c,int d){a=c;b=d;}
	}
	static interface combiner
	{
		public long combine(long a, long b);
	}
	static final int mod=1000000007;
	static final double eps=1e-9;
	static final long inf=100000000000000000L;
	static Reader in=new Reader();
	static StringBuilder output=new StringBuilder();
	static Random rn=new Random();
	static void reverse(int[]a){for(int i=0; i<a.length/2; i++){a[i]^=a[a.length-i-1];a[a.length-i-1]^=a[i];a[i]^=a[a.length-i-1];}}
	static void sort(int[]a)
	{
		int te;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
				a[i]^=a[te];
				a[te]^=a[i];
				a[i]^=a[te];
			}
		}
		Arrays.sort(a);
	}
	static void sort(long[]a)
	{
		int te;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
			a[i]^=a[te];
			a[te]^=a[i];
			a[i]^=a[te];
			}
		}
		Arrays.sort(a);
	}
	static void sort(double[]a)
	{
		int te;
		double te1;
		for(int i=0; i<a.length; i+=2)
		{
			te=rn.nextInt(a.length);
			if(i!=te)
			{
			te1=a[te];
			a[te]=a[i];
			a[i]=te1;
			}
		}
		Arrays.sort(a);
	}
	static void sort(int[][]a)
	{
		Arrays.sort(a, new Comparator<int[]>()
		{
			public int compare(int[]a,int[]b)
			{
				if(a[0]>b[0])
					return -1;
				if(b[0]>a[0])
					return 1;
				return 0;
			}
		});
	}
	static void sort(pair[]a)
	{
		Arrays.sort(a,new Comparator<pair>()
				{
			@Override
			public int compare(pair a,pair b)
			{
				if(a.a>b.a)
					return 1;
				if(b.a>a.a)
				return -1;
				return 0;
			}
				});
	}
	static int log2n(long a)
	{
		int te=0;
		while(a>0)
		{
			a>>=1;
			++te;
		}
		return te;
	}
	static class vector implements Iterable<Integer>
	{
		int a[],size;
		vector(){a=new int[10];size=0;}
		vector(int n){a=new int[n];size=0;}
		public void add(int b){if(++size==a.length)a=Arrays.copyOf(a, 2*size);a[size-1]=b;}
		public void sort(){Arrays.sort(a, 0, size);}
		public void sort(int l, int r){Arrays.sort(a, l, r);}
		@Override
		public Iterator<Integer> iterator() {
			Iterator<Integer> hola=new Iterator<Integer>()
					{
				int cur=0;
						@Override
						public boolean hasNext() {
							return cur<size;
						}
						@Override
						public Integer next() {
							return a[cur++];
						}
					};
			return hola;
		}
	}
	//output functions////////////////
	static void pr(Object a){output.append(a+"\n");}
	static void pr(){output.append("\n");}
	static void p(Object a){output.append(a);}
	static void pra(int[]a){for(int i:a)output.append(i+" ");output.append("\n");}
	static void pra(long[]a){for(long i:a)output.append(i+" ");output.append("\n");}
	static void pra(String[]a){for(String i:a)output.append(i+" ");output.append("\n");}
	static void pra(double[]a){for(double i:a)output.append(i+" ");output.append("\n");}
	static void sop(Object a){System.out.println(a);}
	static void flush(){System.out.println(output);output=new StringBuilder();}
	//////////////////////////////////
	//input functions/////////////////
	static int ni(){return Integer.parseInt(in.next());}
	static long nl(){return Long.parseLong(in.next());}
	static String ns(){return in.next();}
	static double nd(){return Double.parseDouble(in.next());}
	static int[] nia(int n){int a[]=new int[n];for(int i=0; i<n; i++)a[i]=ni();return a;}
	static int[] pnia(int n){int a[]=new int[n+1];for(int i=1; i<=n; i++)a[i]=ni();return a;}
	static long[] nla(int n){long a[]=new long[n];for(int i=0; i<n; i++)a[i]=nl();return a;}
	static String[] nsa(int n){String a[]=new String[n];for(int i=0; i<n; i++)a[i]=ns();return a;}
	static double[] nda(int n){double a[]=new double[n];for(int i=0; i<n; i++)a[i]=nd();return a;}
	//////////////////////////////////
	//some utility functions
	static void exit(){System.out.print(output);System.exit(0);}
	static int min(int... a){int min=a[0];for(int i:a)min=Math.min(min, i);return min;}
	static int max(int... a){int max=a[0];for(int i:a)max=Math.max(max, i);return max;}
	static int gcd(int... a){int gcd=a[0];for(int i:a)gcd=gcd(gcd, i);return gcd;}
	static long min(long... a){long min=a[0];for(long i:a)min=Math.min(min, i);return min;}
	static long max(long... a){long max=a[0];for(long i:a)max=Math.max(max, i);return max;}
	static long gcd(long... a){long gcd=a[0];for(long i:a)gcd=gcd(gcd, i);return gcd;}
	static String pr(String a, long b){String c="";while(b>0){if(b%2==1)c=c.concat(a);a=a.concat(a);b>>=1;}return c;}
	static long powm(long a, long b, long m){long an=1;long c=a;while(b>0){if(b%2==1)an=(an*c)%m;c=(c*c)%m;b>>=1;}return an;}
	static int gcd(int a, int b){if(b==0)return a;return gcd(b, a%b);}
	static long gcd(long a, long b){if(b==0)return a;return gcd(b, a%b);}
	static class Reader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        public Reader() {
            reader = new BufferedReader(new InputStreamReader(System.in), 32768);
            tokenizer = null;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
    }
}

import java.io.*;
import java.util.*;

/**
 * Created by noureldin on 2/20/17.
 */

public class main {

    public static void main(String[] args) throws Exception{
        IO io = new IO(null,null);
        int n = io.getNextInt();
        int [] A = new int[n],B = new int[n];
        boolean [] isNeg = new boolean[n];
        for (int i = 0;i < n;i++) A[i] = io.getNextInt();
        int m = io.getNextInt();
        for (int i = 0;i < m;i++) isNeg[io.getNextInt()-1] = true;
        Stack<Integer> ST = new Stack<>();
        for (int i = 0;i < n;i++){

            if(ST.isEmpty() || ST.peek() != A[i]) {
                if(isNeg[i]){
                    io.println("NO");
                    io.close();
                    System.exit(0);
                }
                B[i] = A[i];
                ST.push(A[i]);
            }
            else if(!isNeg[i]) {
                B[i] = A[i];
                ST.push(A[i]);
            }
            else {
                B[i] = -A[i];
                ST.pop();
            }
        }
        if(!ST.isEmpty()) io.println("NO");
        else{
            io.println("YES");
            for(int i = 0;i < n;i++)
                io.print(-B[n-1-i] + " ");
            io.println("");
        }
        io.close();
    }
}

class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
}

import java.io.*;
import java.util.*;

/**
 * Created by noureldin on 2/20/17.
 */

public class main {

    public static void main(String[] args) throws Exception{
        IO io = new IO(null,null);
        int n = io.getNextInt();
        int [] A = new int[n],B = new int[n];
        boolean [] isNeg = new boolean[n];
        for (int i = 0;i < n;i++) A[n-1-i] = io.getNextInt();
        int m = io.getNextInt();
        for (int i = 0;i < m;i++) A[n-io.getNextInt()] *= -1;
        Stack<Integer> ST = new Stack<>();
        int neg = 0;
        for (int i = 0;i < n;i++){
            B[i] = A[i];
            if(B[i] > 0 && (!ST.isEmpty() && ST.peek() == B[i])) B[i] *= -1;
            if(B[i] > 0) ST.add(B[i]);
            else if(ST.isEmpty()) {
                ST.add(-1);
                break;
            }
            else ST.pop();

        }
        if(!ST.isEmpty()) io.println("NO");
        else{
            io.println("YES");
            for(int i = 0;i < n;i++)
                io.print(-B[n-1-i] + " ");
            io.println("");
        }
        io.close();
    }
}

class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
}

import java.io.*;
import java.util.*;

/**
 * Created by noureldin on 2/20/17.
 */

public class main {

    public static void main(String[] args) throws Exception{
        IO io = new IO(null,null);
        int n = io.getNextInt();
        int [] A = new int[n],B = new int[n];
        boolean [] isNeg = new boolean[n];
        for (int i = 0;i < n;i++) A[i] = io.getNextInt();
        int m = io.getNextInt();
        for (int i = 0;i < m;i++) isNeg[n - io.getNextInt()] = true;
        Stack<Integer> ST = new Stack<>();
        for (int i = 0;i < n;i++){
            if(ST.isEmpty() || ST.peek() != A[i]) {
                if(isNeg[i]){
                    io.println("NO");
                    System.exit(0);
                }
                B[i] = A[i];
                ST.push(A[i]);
            }
            else if(isNeg[i]) {
                B[i] = A[i];
                ST.push(A[i]);
            }
            else {
                B[i] = -A[i];
                ST.pop();
            }
        }
        if(!ST.isEmpty()) io.println("NO");
        else{
            io.println("YES");
            for(int i = 0;i < n;i++)
                io.print(-B[n-1-i] + " ");
            io.println("");
        }
        io.close();
    }
}

class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
}

import java.io.*;
import java.util.*;

/**
 * Created by noureldin on 2/20/17.
 */

public class main {

    public static void main(String[] args) throws Exception{
        IO io = new IO(null,null);
        int n = io.getNextInt();
        int [] A = new int[n],B = new int[n];
        boolean [] isNeg = new boolean[n];
        for (int i = 0;i < n;i++) A[i] = io.getNextInt();
        int m = io.getNextInt();
        for (int i = 0;i < m;i++) isNeg[n - io.getNextInt()] = true;
        Stack<Integer> ST = new Stack<>();
        for (int i = 0;i < n;i++){
            if(ST.isEmpty() || ST.peek() != A[i]) {
                B[i] = A[i];
                ST.push(A[i]);
            }
            else if(isNeg[i]) {
                B[i] = A[i];
                ST.push(A[i]);
            }
            else {
                B[i] = -A[i];
                ST.pop();
            }
        }
        if(!ST.isEmpty()) io.println("NO");
        else{
            io.println("YES");
            for(int i = 0;i < n;i++)
                io.print(B[i] + " ");
            io.println("");
        }
        io.close();
    }
}

class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Stack;
import java.util.StringTokenizer;

public class Abood2D {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] P = new int[n];

		for (int i = 0; i < n; i++)
			P[i] = sc.nextInt();

		boolean[] Q = new boolean[n];
		boolean[] Ans = new boolean[n];

		int q = sc.nextInt();

		for (int i = 0; i < q; i++) {
			int x = sc.nextInt() - 1;
			Ans[x] = Q[x] = true;
		}

		Stack<Integer> s1 = new Stack<>();
		Stack<Integer> s2X = new Stack<>();
		Stack<Integer> s2Y = new Stack<>();

		for (int i = 0; i < n; ++i) {
			if(Q[i]) {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.pop()] = false;
				}else {
					ArrayList<Integer> aX = new ArrayList<>();
					ArrayList<Integer> aY = new ArrayList<>();
					while(true){
						while(!s2X.isEmpty() && P[s2X.peek()] != P[i]) {
							aX.add(s2X.pop());
							aY.add(s2Y.pop());
						}

						if(s2X.isEmpty()) {
							System.out.println("NO");
							return;
						}

						int pX = s2X.pop();
						int pY = s2Y.pop();

						boolean con = false;
						ArrayList<Integer> a2 = new ArrayList<>();
						ArrayList<Integer> a3 = new ArrayList<>();
						Stack<Integer> s = new Stack<>();

						ArrayList<Integer> tmpAX = new ArrayList<>();
						ArrayList<Integer> tmpAY = new ArrayList<>();
						for (int j = aX.size() - 1; j >= 0; --j) {
							if(aX.get(j) < pX && aY.get(j) > pY && !s1.isEmpty() && P[s1.peek()] == P[aY.get(j)]) {
								a2.add(aX.get(j));
								a3.add(aY.get(j));
								s.push(s1.pop());
							} else if(aX.get(j) < pX && aY.get(j) > pY && (s1.isEmpty() || P[s1.peek()] != P[aY.get(j)])){
								con = true;
								while(!s.isEmpty())
									s1.push(s.pop());
								break;
							}

							if(aX.get(j) < pX) {
								tmpAX.add(aX.get(j));
								tmpAY.add(aY.get(j));
							}
						}

						if(con) {
							aX.add(pX);
							aY.add(pY);
							aX = tmpAX;
							aY = tmpAY;
							continue;
						}

						for (int j = a2.size() - 1; j >= 0; --j)
							Ans[s.pop()] = true;

						for (int j = a2.size() - 1; j >= 0; --j) {
							s1.push(a2.get(j));
							Ans[a3.get(j)] = false;
						}

						Ans[pY] = false;
						s1.push(pX);
						break;

					}
				}
			} else {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.peek()] = false;
					Ans[i] = true;
					s2X.push(s1.pop());
					s2Y.push(i);
				} else
					s1.add(i);
			}
		}

		if(!s1.isEmpty())
			out.println("NO");
		else {
			out.println("YES");
			for (int i = 0; i < n; i++)
				out.print((Ans[i] ? -P[i] : P[i]) + " ");
			out.println();
		}

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Stack;
import java.util.StringTokenizer;

public class Abood2D {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] P = new int[n];

		for (int i = 0; i < n; i++)
			P[i] = sc.nextInt();

		boolean[] Q = new boolean[n];
		boolean[] Ans = new boolean[n];

		int q = sc.nextInt();

		for (int i = 0; i < q; i++) {
			int x = sc.nextInt() - 1;
			Ans[x] = Q[x] = true;
		}

		Stack<Integer> s1 = new Stack<>();
		Stack<Point> s2 = new Stack<>();

		for (int i = 0; i < n; i++) {

			if(Q[i]) {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.pop()] = false;
				}else {
					int max = i;
					while(!s2.isEmpty() && (P[s2.peek().x] != P[i] || s2.peek().y >= max))
						max = Math.min(max, s2.pop().x);

					if(s2.isEmpty()) {
						System.out.println("NO");
						return;
					}

					Point p = s2.pop();
					Ans[p.y] = false;
					s1.add(p.x);
				}
			} else {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.peek()] = false;
					Ans[i] = true;
					s2.push(new Point(s1.pop(), i));
				} else
					s1.add(i);
			}
		}

		if(!s1.isEmpty())
			out.println("NO");
		else {
			System.out.println("YES");
			for (int i = 0; i < n; i++)
				out.print((Ans[i] ? -P[i] : P[i]) + " ");
			out.println();
		}

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Stack;
import java.util.StringTokenizer;

public class Abood2D {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] P = new int[n];

		for (int i = 0; i < n; i++)
			P[i] = sc.nextInt();

		boolean[] Q = new boolean[n];
		boolean[] Ans = new boolean[n];

		int q = sc.nextInt();

		for (int i = 0; i < q; i++) {
			int x = sc.nextInt() - 1;
			Ans[x] = Q[x] = true;
		}

		Stack<Integer> s1 = new Stack<>();
		Stack<Point> s2 = new Stack<>();

		for (int i = 0; i < n; i++) {
			if(Q[i]) {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.pop()] = false;
				}else {
					ArrayList<Point> a = new ArrayList<>();
					while(true){
						while(!s2.isEmpty() && P[s2.peek().x] != P[i])
							a.add(s2.pop());

						if(s2.isEmpty()) {
							System.out.println("NOOOOO" + (i + 1));
							return;
						}

						Point p = s2.pop();
						boolean con = false;
						ArrayList<Integer> a2 = new ArrayList<>();
						ArrayList<Integer> a3 = new ArrayList<>();
						Stack<Integer> s = new Stack<>();
						for (int j = a.size() - 1; j >= 0; j--)
							if(a.get(j).x < p.x && a.get(j).y > p.y && !s1.isEmpty() && P[s1.peek()] == P[a.get(j).y]) {
								a2.add(a.get(j).x);
								a3.add(a.get(j).y);
								s.push(s1.pop());
							} else if(a.get(j).x < p.x && a.get(j).y > p.y && (s1.isEmpty() || P[s1.peek()] != P[a.get(j).y])){
								con = true;
								while(!s.isEmpty())
									s1.push(s.pop());
								break;
							}

						if(con) {
							a.add(p);
							continue;
						}

						while(!s.isEmpty())
							s1.push(s.pop());

						for (int j = a2.size() - 1; j >= 0; j--) {
							Ans[s1.pop()] = true;
						}

						for (int j = a2.size() - 1; j >= 0; j--) {
							s1.push(a2.get(j));
							Ans[a3.get(j)] = false;
						}

						Ans[p.y] = false;
						s1.push(p.x);
						break;

					}
				}
			} else {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.peek()] = false;
					Ans[i] = true;
					s2.push(new Point(s1.pop(), i));
				} else
					s1.add(i);
			}
		}

		if(!s1.isEmpty())
			out.println("NO");
		else {
			System.out.println("YES");
			for (int i = 0; i < n; i++)
				out.print((Ans[i] ? -P[i] : P[i]) + " ");
			out.println();
		}

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Stack;
import java.util.StringTokenizer;

public class Abood2D {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] P = new int[n];

		for (int i = 0; i < n; i++)
			P[i] = sc.nextInt();

		boolean[] Q = new boolean[n];
		boolean[] Ans = new boolean[n];

		int q = sc.nextInt();

		for (int i = 0; i < q; i++) {
			int x = sc.nextInt() - 1;
			Ans[x] = Q[x] = true;
		}

		Stack<Integer> s1 = new Stack<>();
		Stack<Integer> s2X = new Stack<>();
		Stack<Integer> s2Y = new Stack<>();

		for (int i = 0; i < n; ++i) {
			if(Q[i]) {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.pop()] = false;
				}else {
					ArrayList<Integer> aX = new ArrayList<>();
					ArrayList<Integer> aY = new ArrayList<>();
					while(true){
						while(!s2X.isEmpty() && P[s2X.peek()] != P[i]) {
							aX.add(s2X.pop());
							aY.add(s2Y.pop());
						}

						if(s2X.isEmpty()) {
							System.out.println("NO");
							return;
						}

						int pX = s2X.pop();
						int pY = s2Y.pop();

						boolean con = false;
						ArrayList<Integer> a2 = new ArrayList<>();
						ArrayList<Integer> a3 = new ArrayList<>();
						Stack<Integer> s = new Stack<>();

						ArrayList<Integer> tmpAX = new ArrayList<>();
						ArrayList<Integer> tmpAY = new ArrayList<>();
						for (int j = aX.size() - 1; j >= 0; --j) {
							if(aX.get(j) < pX && aY.get(j) > pY && !s1.isEmpty() && P[s1.peek()] == P[aY.get(j)]) {
								a2.add(aX.get(j));
								a3.add(aY.get(j));
								s.push(s1.pop());
							} else if(aX.get(j) < pX && aY.get(j) > pY && (s1.isEmpty() || P[s1.peek()] != P[aY.get(j)])){
								con = true;
								while(!s.isEmpty())
									s1.push(s.pop());
								break;
							}

							if(aX.get(j) < pX) {
								tmpAX.add(aX.get(j));
								tmpAY.add(aY.get(j));
							}
						}

						if(con) {
							aX = tmpAX;
							aY = tmpAY;
							aX.add(pX);
							aY.add(pY);
							continue;
						}

						for (int j = a2.size() - 1; j >= 0; --j)
							Ans[s.pop()] = true;

						for (int j = a2.size() - 1; j >= 0; --j) {
							s1.push(a2.get(j));
							Ans[a3.get(j)] = false;
						}

						Ans[pY] = false;
						s1.push(pX);
						break;

					}
				}
			} else {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.peek()] = false;
					Ans[i] = true;
					s2X.push(s1.pop());
					s2Y.push(i);
				} else
					s1.add(i);
			}
		}

		if(!s1.isEmpty())
			out.println("NO");
		else {
			out.println("YES");
			for (int i = 0; i < n; i++)
				out.print((Ans[i] ? -P[i] : P[i]) + " ");
			out.println();
		}

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Stack;
import java.util.StringTokenizer;

public class Abood2D {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] P = new int[n];

		for (int i = 0; i < n; i++)
			P[i] = sc.nextInt();

		boolean[] Q = new boolean[n];
		boolean[] Ans = new boolean[n];

		int q = sc.nextInt();

		for (int i = 0; i < q; i++) {
			int x = sc.nextInt() - 1;
			Ans[x] = Q[x] = true;
		}

		Stack<Integer> s1 = new Stack<>();
		Stack<Point> s2 = new Stack<>();

		for (int i = 0; i < n; i++) {
			if(Q[i]) {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.pop()] = false;
				}else {
					while(!s2.isEmpty() && P[s2.peek().x] != P[i])
						s2.pop();

					if(s2.isEmpty()) {
						System.out.println("NO");
						return;
					}

					Point p = s2.pop();
					Ans[p.y] = false;
					s1.add(p.x);
				}
			} else {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.peek()] = false;
					Ans[i] = true;
					s2.push(new Point(s1.pop(), i));
				} else
					s1.add(i);
			}
		}

		if(!s1.isEmpty())
			out.println("NO");
		else {
			System.out.println("YES");
			for (int i = 0; i < n; i++)
				out.print((Ans[i] ? -P[i] : P[i]) + " ");
			out.println();
		}

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Stack;
import java.util.StringTokenizer;

public class Abood2D {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] P = new int[n];

		for (int i = 0; i < n; i++)
			P[i] = sc.nextInt();

		boolean[] Q = new boolean[n];
		boolean[] Ans = new boolean[n];

		int q = sc.nextInt();

		for (int i = 0; i < q; i++) {
			int x = sc.nextInt() - 1;
			Ans[x] = Q[x] = true;
		}

		Stack<Integer> s1 = new Stack<>();
		Stack<Integer> s2X = new Stack<>();
		Stack<Integer> s2Y = new Stack<>();

		for (int i = 0; i < n; ++i) {
			if(Q[i]) {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.pop()] = false;
				}else {
					ArrayList<Integer> aX = new ArrayList<>();
					ArrayList<Integer> aY = new ArrayList<>();
					while(true){
						while(!s2X.isEmpty() && P[s2X.peek()] != P[i]) {
							aX.add(s2X.pop());
							aY.add(s2Y.pop());
						}

						if(s2X.isEmpty()) {
							System.out.println("NO");
							return;
						}

						int pX = s2X.pop();
						int pY = s2Y.pop();
						boolean con = false;
						ArrayList<Integer> a2 = new ArrayList<>();
						ArrayList<Integer> a3 = new ArrayList<>();
						Stack<Integer> s = new Stack<>();

						ArrayList<Integer> tmpAX = new ArrayList<>();
						ArrayList<Integer> tmpAY = new ArrayList<>();
						for (int j = aX.size() - 1; j >= 0; --j) {
							if(aX.get(j) < pX && aY.get(j) > pY && !s1.isEmpty() && P[s1.peek()] == P[aY.get(j)]) {

								a2.add(aX.get(j));
								a3.add(aY.get(j));
								s.push(s1.pop());
							} else if(aX.get(j) < pX && aY.get(j) > pY && (s1.isEmpty() || P[s1.peek()] != P[aY.get(j)])){
								con = true;

							}
							if(aX.get(j) < pX) {
								tmpAX.add(aX.get(j));
								tmpAY.add(aY.get(j));
							}
						}
						if(con) {
							aX = new ArrayList<>();
							aY = new ArrayList<>();
							for (int j = aX.size() - 1; j >= 0; --j) {
								aX.add(tmpAX.get(j));
								aY.add(tmpAY.get(j));
							}
							aX.add(pX);
							aY.add(pY);
							while(!s.isEmpty())
								s1.push(s.pop());
							continue;
						}

						for (int j = a2.size() - 1; j >= 0; --j) {
							Ans[s.pop()] = true;
						}

						for (int j = a2.size() - 1; j >= 0; --j) {
							s1.push(a2.get(j));
							Ans[a3.get(j)] = false;
						}

						Ans[pY] = false;
						s1.push(pX);
						break;

					}
				}
			} else {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.peek()] = false;
					Ans[i] = true;
					s2X.push(s1.pop());
					s2Y.push(i);
				} else
					s1.add(i);
			}
		}

		if(!s1.isEmpty())
			out.println("NO");
		else {
			out.println("YES");
			for (int i = 0; i < n; i++)
				out.print((Ans[i] ? -P[i] : P[i]) + " ");
			out.println();
		}

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Stack;
import java.util.StringTokenizer;

public class Abood2D {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] P = new int[n];

		for (int i = 0; i < n; i++)
			P[i] = sc.nextInt();

		boolean[] Q = new boolean[n];
		boolean[] Ans = new boolean[n];

		int q = sc.nextInt();

		for (int i = 0; i < q; i++) {
			int x = sc.nextInt() - 1;
			Ans[x] = Q[x] = true;
		}

		Stack<Integer> s1 = new Stack<>();
		Stack<Integer> s2X = new Stack<>();
		Stack<Integer> s2Y = new Stack<>();

		for (int i = 0; i < n; ++i) {
			if(Q[i]) {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.pop()] = false;
				}else {
					ArrayList<Integer> aX = new ArrayList<>();
					ArrayList<Integer> aY = new ArrayList<>();
					while(true){
						while(!s2X.isEmpty() && P[s2X.peek()] != P[i]) {
							aX.add(s2X.pop());
							aY.add(s2Y.pop());
						}

						if(s2X.isEmpty()) {
							System.out.println("NO");
							return;
						}

						int pX = s2X.pop();
						int pY = s2Y.pop();
						boolean con = false;
						ArrayList<Integer> a2 = new ArrayList<>();
						ArrayList<Integer> a3 = new ArrayList<>();
						Stack<Integer> s = new Stack<>();

						ArrayList<Integer> tmpAX = new ArrayList<>();
						ArrayList<Integer> tmpAY = new ArrayList<>();
						for (int j = aX.size() - 1; j >= 0; --j) {
							if(aX.get(j) < pX && aY.get(j) > pY && !s1.isEmpty() && P[s1.peek()] == P[aY.get(j)]) {

								a2.add(aX.get(j));
								a3.add(aY.get(j));
								s.push(s1.pop());
							} else if(aX.get(j) < pX && aY.get(j) > pY && (s1.isEmpty() || P[s1.peek()] != P[aY.get(j)])){
								con = true;

							}
							if(aX.get(j) < pX) {
								tmpAX.add(aX.get(j));
								tmpAY.add(aY.get(j));
							}
						}
						if(con) {
							aX = new ArrayList<>();
							aY = new ArrayList<>();
							for (int j = aX.size() - 1; j >= 0; --j) {
								aX.add(tmpAX.get(j));
								aY.add(tmpAY.get(j));
							}
							aX.add(pX);
							aY.add(pY);
							while(!s.isEmpty())
								s1.push(s.pop());
							continue;
						}

						for (int j = 0; j < a2.size(); ++j) {
							Ans[s.pop()] = true;
						}

						for (int j = 0; j < a2.size(); ++j) {
							s1.push(a2.get(j));
							Ans[a3.get(j)] = false;
						}

						Ans[pY] = false;
						s1.push(pX);
						break;

					}
				}
			} else {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.peek()] = false;
					Ans[i] = true;
					s2X.push(s1.pop());
					s2Y.push(i);
				} else
					s1.add(i);
			}
		}

		if(!s1.isEmpty())
			out.println("NO");
		else {
			out.println("YES");
			for (int i = 0; i < n; i++)
				out.print((Ans[i] ? -P[i] : P[i]) + " ");
			out.println();
		}

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Stack;
import java.util.StringTokenizer;

public class Abood2D {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] P = new int[n];

		for (int i = 0; i < n; i++)
			P[i] = sc.nextInt();

		boolean[] Q = new boolean[n];
		boolean[] Ans = new boolean[n];

		int q = sc.nextInt();

		for (int i = 0; i < q; i++) {
			int x = sc.nextInt() - 1;
			Ans[x] = Q[x] = true;
		}

		int[] next = new int[n + 1];

		for (int i = 0; i <= n; i++)
			next[i] = i - 1;

		for (int i = 0; i < n; i++) {
			if(Q[i]) {
				Stack<Integer> s = new Stack<>();
				boolean f = false;
				for (int j = i - 1; j >= 0; j = next[j]) {
					if(P[j] == P[i] && s.isEmpty()) {
						f = true;
						next[i + 1] = j - 1;
						break;
					} else {
						if(!s.isEmpty() && P[s.peek()] == P[j])
							Ans[s.pop()] = true;
						else
							s.push(j);
					}
				}

				if(!f) {
					System.out.println("NO");
					return;
				}
			}
		}

		Stack<Integer> s = new Stack<>();
		for (int i = next[n]; i >= 0; i = next[i]) {
			if(!s.isEmpty() && P[s.peek()] == P[i])
				Ans[s.pop()] = true;
			else
				s.push(i);
		}

		if(s.isEmpty()) {
			out.println("YES");
			for (int i = 0; i < n; i++)
				out.print((Ans[i] ? -P[i] : P[i]) + " ");
			out.println();
		}else
			out.print("NO");

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.awt.Point;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Stack;
import java.util.StringTokenizer;

public class Abood2D {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] P = new int[n];

		for (int i = 0; i < n; i++)
			P[i] = sc.nextInt();

		boolean[] Q = new boolean[n];
		boolean[] Ans = new boolean[n];

		int q = sc.nextInt();

		for (int i = 0; i < q; i++) {
			int x = sc.nextInt() - 1;
			Ans[x] = Q[x] = true;
		}

		Stack<Integer> s1 = new Stack<>();
		Stack<Point> s2 = new Stack<>();

		for (int i = 0; i < n; i++) {
			if(Q[i]) {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.pop()] = false;
				}else {
					ArrayList<Point> a = new ArrayList<>();
					while(true){
						while(!s2.isEmpty() && P[s2.peek().x] != P[i])
							a.add(s2.pop());

						if(s2.isEmpty()) {
							System.out.println("NO");
							return;
						}

						Point p = s2.pop();
						boolean con = false;
						ArrayList<Integer> a2 = new ArrayList<>();
						ArrayList<Integer> a3 = new ArrayList<>();
						Stack<Integer> s = new Stack<>();
						for (int j = 0; j < a.size(); j++)
							if(a.get(j).x < p.x && a.get(j).y > p.y && !s1.isEmpty() && P[s1.peek()] == P[a.get(j).y]) {
								a2.add(a.get(j).x);
								a3.add(a.get(j).y);
								s.push(s1.pop());
							} else if(a.get(j).x < p.x && a.get(j).y > p.y && (s1.isEmpty() || P[s1.peek()] != P[a.get(j).y])){
								con = true;
								a2 = new ArrayList<>();
								a3 = new ArrayList<>();
								while(!s.isEmpty())
									s1.push(s.pop());
								break;
							}

						if(con) {
							a.add(p);
							continue;
						}

						while(!s.isEmpty())
							s1.push(s.pop());

						for (int j = 0; j < a2.size(); j++) {
							Ans[s1.pop()] = true;
						}

						for (int j = 0; j < a2.size(); j++) {
							s1.push(a2.get(j));
							Ans[a3.get(j)] = false;
						}

						Ans[p.y] = false;
						s1.push(p.x);
						break;

					}
				}
			} else {
				if(!s1.isEmpty() && P[s1.peek()] == P[i]) {
					Ans[s1.peek()] = false;
					Ans[i] = true;
					s2.push(new Point(s1.pop(), i));
				} else
					s1.add(i);
			}
		}

		if(!s1.isEmpty())
			out.println("NO");
		else {
			System.out.println("YES");
			for (int i = 0; i < n; i++)
				out.print((Ans[i] ? -P[i] : P[i]) + " ");
			out.println();
		}

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Stack;
import java.util.StringTokenizer;

public class Abood2D {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = sc.nextInt();

		int[] P = new int[n];

		for (int i = 0; i < n; i++)
			P[i] = sc.nextInt();

		boolean[] Q = new boolean[n];
		boolean[] Ans = new boolean[n];

		int q = sc.nextInt();

		for (int i = 0; i < q; i++) {
			int x = sc.nextInt() - 1;
			Ans[x] = Q[x] = true;
		}

		int[] next = new int[n + 1];

		for (int i = 0; i <= n; i++)
			next[i] = i - 1;

		for (int i = 0; i < n; i++) {
			if(Q[i]) {
				Stack<Integer> s = new Stack<>();
				boolean f = false;
				for (int j = i - 1; j >= 0; j = next[j]) {
					if(P[j] == P[i] && s.isEmpty()) {
						f = true;
						next[i + 1] = j > 0 ? next[j] : -1;
						break;
					} else {
						if(!s.isEmpty() && P[s.peek()] == P[j])
							Ans[s.pop()] = true;
						else
							s.push(j);
					}
				}

				if(!f) {
					System.out.println("NO");
					return;
				}
			}
		}

		Stack<Integer> s = new Stack<>();
		for (int i = next[n]; i >= 0; i = next[i]) {
			if(!s.isEmpty() && P[s.peek()] == P[i])
				Ans[s.pop()] = true;
			else
				s.push(i);
		}

		if(s.isEmpty()) {
			out.println("YES");
			for (int i = 0; i < n; i++)
				out.print((Ans[i] ? -P[i] : P[i]) + " ");
			out.println();
		}else
			out.print("NO");

		out.flush();

	}

	static class Scanner

	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException
		{
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);
		}

		public boolean ready() throws IOException {return br.ready();}

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter out;

	public void solve() throws IOException {
		int N = nextInt();
		int[] a = new int[N];
		for(int i = 0; i < N; i++){
			a[i] = nextInt();
		}
		int Q = nextInt();
		for(int i = 0; i < Q; i++){
			int index = nextInt()-1;
			a[ index ] = -1 * a[ index ];
		}
		int[] ans = new int[N];
		Stack<Integer> s = new Stack<Integer>();
		for(int i = 0; i < N; i++){
			if( s.empty() ){
				s.push( a[i] );
				ans[i] = a[i];
			}
			else{
				int top = s.peek();
				if( Math.abs(top) == Math.abs(a[i]) ){
					if( top < 0 && a[i] < 0 ){
						s.push( a[i] );
						ans[i] = a[i];
					}
					else{
						s.pop();
						ans[i] = -1*top;
					}
				}
				else{
					s.push( a[i] );
					ans[i] = a[i];
				}
			}
		}
		if( s.empty() ){
			out.println("YES");
			for(int i = 0; i < N; i++){
				out.print( ans[i] + " ");
			}
		}
		else{
			out.println("NO");
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new C().run();
	}

	public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            out = new PrintWriter(System.out);
            solve();
            reader.close();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter out;

 	public void shuffleArray(int[] arr) {
         Random rnd = new Random();
         for (int i = arr.length - 1; i >= 0; i--) {
             int pos = rnd.nextInt(i + 1);
             int temp = arr[i];
             arr[i] = arr[pos];
             arr[pos] = temp;
         }
     }

	public void solve() throws IOException {
		int N = nextInt();
		int[] a = new int[N];
		for(int i = 0; i < N; i++){
			a[i] = nextInt();
		}
		int[] sign = new int[N];
		int Q = nextInt();
		int[] neg = new int[Q];
		for(int i = 0; i < Q; i++){
			neg[i] = nextInt()-1;;
			sign[neg[i]] = 2; // negative
		}
		shuffleArray(neg);
		Arrays.sort(neg);

		int start_search = N;
		for(int i = 0; i < Q; i++){
			start_search = Math.min(start_search, neg[i]-1);
			boolean found = false;
			while( start_search >= 0){
				if( a[neg[i]] == a[start_search] && sign[start_search] == 0 ){
					sign[start_search] = 1; // positive
					start_search--;
					found = true;
					break;
				}
				start_search--;
			}
			if( !found ){
				out.println("NO"); return;
			}
		}

//		for(int i = 0; i < N; i++){
//			out.print( a[i] + "( " + sign[i] + ") ") ;
//		}
//		out.println();

		Stack<Integer> s = new Stack<Integer>();
		for(int i = 0; i < N; i++){
			if( s.empty() ){
				if( sign[i] == 2){
					out.println("NO"); return;
				}
				else{
					s.push(i);
					sign[i] = 1;
				}
			}
			else{
				if( a[s.peek()] == a[i] && sign[i] != 1){
					s.pop();
					sign[i] = 2;
				}
				else{
					s.push(i);
					sign[i] = 1;
				}
			}
		}

//		for(int i = 0; i < N; i++){
//			out.print( a[i] + "( " + sign[i] + ") ") ;
//		}
//		out.println();

		if( s.empty() ){
			out.println("YES");
			for(int i = 0; i < N; i++){
				out.print( (a[i] * (sign[i]==2?-1:1) ) + " ");
			}
		}
		else{
			out.println("NO");
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new C().run();
	}

	public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            out = new PrintWriter(System.out);
            solve();
            reader.close();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter out;

 	public void shuffleArray(int[] arr) {
         Random rnd = new Random();
         for (int i = arr.length - 1; i >= 0; i--) {
             int pos = rnd.nextInt(i + 1);
             int temp = arr[i];
             arr[i] = arr[pos];
             arr[pos] = temp;
         }
     }

	public void solve() throws IOException {
		int N = nextInt();
		int[] a = new int[N];
		for(int i = 0; i < N; i++){
			a[i] = nextInt();
		}
		int[] sign = new int[N];
		int Q = nextInt();
		int[] neg = new int[Q];
		for(int i = 0; i < Q; i++){
			neg[i] = nextInt()-1;;
			sign[neg[i]] = 2; // negative
		}
		shuffleArray(neg);
		Arrays.sort(neg);

		int start_search = N;
		int end_search = N;
		for(int i = 0; i < Q; i++){
//		for(int i = Q-1; i >= 0; i--){
//			start_search = Math.min(start_search, neg[i]-1);
			start_search = neg[i]-1;
			boolean found = false;
			while( start_search >= 0){
				if( a[neg[i]] == a[start_search] && sign[start_search] == 0 ){
					sign[start_search] = 1; // positive
					found = true;
				}
				start_search--;
				if( found ) break;
			}
			if( !found ){
				out.println("NO"); return;
			}
//			end_search = neg[i];
		}

//		for(int i = 0; i < N; i++){
//			out.print( a[i] + "( " + sign[i] + ") ") ;
//		}
//		out.println();

		Stack<Integer> s = new Stack<Integer>();
		for(int i = 0; i < N; i++){
			if( s.empty() ){
				if( sign[i] == 2){
					out.println("NO"); return;
				}
				else{
					s.push(i);
					sign[i] = 1;
				}
			}
			else{
				if( a[s.peek()] == a[i] && sign[i] != 1){
					s.pop();
					sign[i] = 2;
				}
				else{
					s.push(i);
					sign[i] = 1;
				}
			}
		}

//		for(int i = 0; i < N; i++){
//			out.print( a[i] + "( " + sign[i] + ") ") ;
//		}
//		out.println();

		if( s.empty() ){
			out.println("YES");
			for(int i = 0; i < N; i++){
				out.print( (a[i] * (sign[i]==2?-1:1) ) + " ");
			}
		}
		else{
			out.println("NO");
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new C().run();
	}

	public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            out = new PrintWriter(System.out);
            solve();
            reader.close();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter out;

 	public void shuffleArray(int[] arr) {
         Random rnd = new Random();
         for (int i = arr.length - 1; i >= 0; i--) {
             int pos = rnd.nextInt(i + 1);
             int temp = arr[i];
             arr[i] = arr[pos];
             arr[pos] = temp;
         }
     }

	public void solve() throws IOException {
		int N = nextInt();
		int[] a = new int[N];
		for(int i = 0; i < N; i++){
			a[i] = nextInt();
		}
		int[] sign = new int[N];
		int Q = nextInt();
		int[] neg = new int[Q];
		for(int i = 0; i < Q; i++){
			neg[i] = nextInt()-1;;
			sign[neg[i]] = 2; // negative
		}
		shuffleArray(neg);
		Arrays.sort(neg);

		int start_search = N;
		int end_search = N;
		for(int i = 0; i < Q; i++){
			start_search = Math.min(start_search, neg[i]-1);
			boolean found = false;

			if( i > 0){
				int search = neg[i]-1;
				while( search >= neg[i-1] ){
					if( a[neg[i]] == a[search] && sign[search] == 0 ){
						sign[search] = 1; // positive
						found = true;
					}
					search--;
					if( found ) break;
				}
			}

			if(!found)
				while( start_search >= 0){
					if( a[neg[i]] == a[start_search] && sign[start_search] == 0 ){
						sign[start_search] = 1; // positive
						found = true;
					}
					start_search--;
					if( found ) break;
				}

			if( !found ){
				out.println("NO"); return;
			}
//			end_search = neg[i];
		}

//		for(int i = 0; i < N; i++){
//			out.print( a[i] + "( " + sign[i] + ") ") ;
//		}
//		out.println();

		Stack<Integer> s = new Stack<Integer>();
		for(int i = 0; i < N; i++){
			if( s.empty() ){
				if( sign[i] == 2){
					out.println("NO"); return;
				}
				else{
					s.push(i);
					sign[i] = 1;
				}
			}
			else{
				if( a[s.peek()] == a[i] && sign[i] != 1){
					s.pop();
					sign[i] = 2;
				}
				else{
					s.push(i);
					sign[i] = 1;
				}
			}
		}

//		for(int i = 0; i < N; i++){
//			out.print( a[i] + "( " + sign[i] + ") ") ;
//		}
//		out.println();

		if( s.empty() ){
			out.println("YES");
			for(int i = 0; i < N; i++){
				out.print( (a[i] * (sign[i]==2?-1:1) ) + " ");
			}
		}
		else{
			out.println("NO");
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new C().run();
	}

	public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            out = new PrintWriter(System.out);
            solve();
            reader.close();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;
import java.util.Stack;
import java.util.StringTokenizer;

public class C {
	BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter out;

 	public void shuffleArray(int[] arr) {
         Random rnd = new Random();
         for (int i = arr.length - 1; i >= 0; i--) {
             int pos = rnd.nextInt(i + 1);
             int temp = arr[i];
             arr[i] = arr[pos];
             arr[pos] = temp;
         }
     }

	public void solve() throws IOException {
		int N = nextInt();
		int[] a = new int[N];
		for(int i = 0; i < N; i++){
			a[i] = nextInt();
		}
		int[] sign = new int[N];
		int Q = nextInt();
		int[] neg = new int[Q];
		for(int i = 0; i < Q; i++){
			neg[i] = nextInt()-1;;
			sign[neg[i]] = 2; // negative
		}
		shuffleArray(neg);
		Arrays.sort(neg);

		int start_search = N;
		for(int i = 0; i < Q; i++){
			start_search = Math.min(start_search, neg[i]-1);
			while( start_search >= 0){
				if( a[neg[i]] == a[start_search] && sign[start_search] == 0 ){
					sign[start_search] = 1; // positive
					break;
				}
				start_search--;
			}
			if( start_search == -1 ){
				out.println("NO"); return;
			}
		}

//		for(int i = 0; i < N; i++){
//			out.print( a[i] + "( " + sign[i] + ") ") ;
//		}
//		out.println();

		Stack<Integer> s = new Stack<Integer>();
		for(int i = 0; i < N; i++){
			if( s.empty() ){
				if( sign[i] == 2){
					out.println("NO"); return;
				}
				else{
					s.push(i);
					sign[i] = 1;
				}
			}
			else{
				if( a[s.peek()] == a[i] && sign[i] != 1){
					s.pop();
					sign[i] = 2;
				}
				else{
					s.push(i);
					sign[i] = 1;
				}
			}
		}

//		for(int i = 0; i < N; i++){
//			out.print( a[i] + "( " + sign[i] + ") ") ;
//		}
//		out.println();

		if( s.empty() ){
			out.println("YES");
			for(int i = 0; i < N; i++){
				out.print( (a[i] * (sign[i]==2?-1:1) ) + " ");
			}
		}
		else{
			out.println("NO");
		}
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		new C().run();
	}

	public void run() {
        try {
            reader = new BufferedReader(new InputStreamReader(System.in));
            tokenizer = null;
            out = new PrintWriter(System.out);
            solve();
            reader.close();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeSet;

public class ProblemC {

	static Map<Integer, TreeSet<Integer>> sameAbsX = new HashMap<Integer, TreeSet<Integer>>();
	static Map<Integer, TreeSet<Integer>> sameAbsY = new HashMap<Integer, TreeSet<Integer>>();
	static Map<Integer, TreeSet<Integer>> sameNegX = new HashMap<Integer, TreeSet<Integer>>();
	static Map<Integer, TreeSet<Integer>> sameNegY = new HashMap<Integer, TreeSet<Integer>>();

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);

		int n = Integer.valueOf(in.readLine());
		String[] ai = in.readLine().split(" ");
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = Integer.valueOf(ai[i]);
		}
		String[] ndata = in.readLine().split(" ");
		int num = Integer.valueOf(ndata[0]);
		for (int i = 1 ; i <= num ; i++) {
			a[Integer.valueOf(ndata[i])-1] *= -1;
		}
		if (n % 2 == 1 || num > n / 2) {
			out.println("NO");
			out.flush();
			return;
		}

		sameAbsX = new HashMap<Integer, TreeSet<Integer>>();
		sameNegX = new HashMap<Integer, TreeSet<Integer>>();
		sameAbsY = new HashMap<Integer, TreeSet<Integer>>();
		sameNegY = new HashMap<Integer, TreeSet<Integer>>();
		for (int i = 0 ; i < n ; i++) {
			Map<Integer, TreeSet<Integer>> sameAbs = sameAbsX;
			Map<Integer, TreeSet<Integer>> sameNeg = sameNegX;
			if (i % 2 == 0) {
				sameAbs = sameAbsY;
				sameNeg = sameNegY;
			}
			int ab = Math.abs(a[i]);
			if (!sameAbs.containsKey(ab)) {
				sameAbs.put(ab, new TreeSet<Integer>());
			}
			sameAbs.get(ab).add(i);
			if (a[i] <= -1) {
				if (!sameNeg.containsKey(ab)) {
					sameNeg.put(ab, new TreeSet<Integer>());
				}
				sameNeg.get(ab).add(i);
			}
		}

		try {
			solve(0, n-1, a);
		} catch (Exception e) {
			isok = false;
		}
		if (!isok) {
			out.println("NO");
		} else {
			out.println("YES");
			StringBuffer b = new StringBuffer();
			for (int i = 0 ; i < n ; i++) {
				b.append(a[i]).append(" ");
			}
			out.println(b.substring(0, b.length()-1));
		}
		out.flush();
	}

	static boolean isok = true;

	private static void solve(int i, int j, int[] a) throws Exception {
		if (i >= j) {
			return;
		}
		if (a[i] <= -1) {
			throw new Exception();
		}
		Map<Integer, TreeSet<Integer>> sameAbs = sameAbsY;
		Map<Integer, TreeSet<Integer>> sameNeg = sameNegY;
		if (i % 2 == 0) {
			sameAbs = sameAbsX;
			sameNeg = sameNegX;
		}
		int f = i;
		int t = j;
		int bj = -1;
		j = -1;
		if (sameAbs.get(a[i]) == null) {
			throw new Exception();
		}
		if (!(sameNeg.get(a[i]) == null)) {
			j = sameNeg.get(a[i]).pollLast();
		}
		bj = sameAbs.get(a[i]).pollLast();
		if (i >= j) {
			j = bj;
			if (i >= j) {
				throw new Exception();
			}
			if (a[j] >= 1) {
				a[j] *= -1;
			}
			solve(f+1, j-1, a);
			solve(j+1, t, a);
		} else {
			solve(f+1, j-1, a);
			solve(j+1, t, a);
		}
	}

	public static void debug(Object... o) {
		System.err.println(Arrays.deepToString(o));
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeSet;

public class ProblemC {

	static Map<Integer, TreeSet<Integer>> sameAbs = new HashMap<Integer, TreeSet<Integer>>();
	static Map<Integer, TreeSet<Integer>> sameNeg = new HashMap<Integer, TreeSet<Integer>>();

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);

		int n = Integer.valueOf(in.readLine());
		String[] ai = in.readLine().split(" ");
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = Integer.valueOf(ai[i]);
		}
		String[] ndata = in.readLine().split(" ");
		int num = Integer.valueOf(ndata[0]);
		for (int i = 1 ; i <= num ; i++) {
			a[Integer.valueOf(ndata[i])-1] *= -1;
		}
		if (n % 2 == 1 || num > n / 2) {
			out.println("NO");
			out.flush();
			return;
		}

		sameAbs = new HashMap<Integer, TreeSet<Integer>>();
		sameNeg = new HashMap<Integer, TreeSet<Integer>>();
		for (int i = 0 ; i < n ; i++) {
			int ab = Math.abs(a[i]);
			if (!sameAbs.containsKey(ab)) {
				sameAbs.put(ab, new TreeSet<Integer>());
			}
			sameAbs.get(ab).add(i);
			if (a[i] <= -1) {
				if (!sameNeg.containsKey(ab)) {
					sameNeg.put(ab, new TreeSet<Integer>());
				}
				sameNeg.get(ab).add(i);
			}
		}

		try {
			solve(0, n-1, a);
		} catch (Exception e) {
			isok = false;
		}
		if (!isok) {
			out.println("NO");
		} else {
			out.println("YES");
			StringBuffer b = new StringBuffer();
			for (int i = 0 ; i < n ; i++) {
				b.append(a[i]).append(" ");
			}
			out.println(b.substring(0, b.length()-1));
		}
		out.flush();
	}

	static boolean isok = true;

	private static void solve(int i, int j, int[] a) throws Exception {
		if (i >= j) {
			return;
		}
		if (a[i] <= -1) {
			throw new Exception();
		}
		int f = i;
		int t = j;
		int bj = -1;
		j = -1;
		if (sameAbs.get(a[i]) == null) {
			throw new Exception();
		}

		if (!(sameNeg.get(a[i]) == null)) {
			j = sameNeg.get(a[i]).pollLast();
		}
		bj = sameAbs.get(a[i]).pollLast();

		if (i >= j) {
			j = bj;
			if (i >= j) {
				throw new Exception();
			}
			if (a[j] >= 1) {
				a[j] *= -1;
			}
			solve(f+1, j-1, a);
			solve(j+1, t, a);
		} else {
			solve(f+1, j-1, a);
			solve(j+1, t, a);
		}
	}

	public static void debug(Object... o) {
		System.err.println(Arrays.deepToString(o));
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;

public class ProblemC {

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);

		int n = Integer.valueOf(in.readLine());
		String[] ai = in.readLine().split(" ");
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = Integer.valueOf(ai[i]);
		}
		String[] ndata = in.readLine().split(" ");
		int num = Integer.valueOf(ndata[0]);
		for (int i = 1 ; i <= num ; i++) {
			a[Integer.valueOf(ndata[i])-1] *= -1;
		}
		if (n % 2 == 1 || num > n / 2) {
			out.println("NO");
			out.flush();
			return;
		}

		try {
			solve(0, n-1, a);
		} catch (Exception e) {
			isok = false;
		}
		if (!isok) {
			out.println("NO");
		} else {
			out.println("YES");
			StringBuffer b = new StringBuffer();
			for (int i = 0 ; i < n ; i++) {
				b.append(a[i]).append(" ");
			}
			out.println(b.substring(0, b.length()-1));
		}
		out.flush();
	}

	static boolean isok = true;

	private static void solve(int i, int j, int[] a) throws Exception {
		if (i >= j) {
			return;
		}
		if (a[i] <= -1) {
			throw new Exception();
		}
		int f = i;
		int t = j;
		while (a[j] != -a[i] && i < j) {
			j -= 2;
		}
		if (i >= j) {
			j = t;
			while (Math.abs(a[j]) != a[i] && i < j) {
				j -= 2;
			}
			if (i >= j) {
				throw new Exception();
			}
			if (a[j] >= 1) {
				a[j] *= -1;
			}
			solve(f+1, j-1, a);
			solve(j+1, t, a);
		} else {
			solve(f+1, j-1, a);
			solve(j+1, t, a);
		}
	}

	public static void debug(Object... o) {
		System.err.println(Arrays.deepToString(o));
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;

public class ProblemC {

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);

		int n = Integer.valueOf(in.readLine());
		String[] ai = in.readLine().split(" ");
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = Integer.valueOf(ai[i]);
		}
		String[] ndata = in.readLine().split(" ");
		int num = Integer.valueOf(ndata[0]);
		for (int i = 1 ; i <= num ; i++) {
			a[Integer.valueOf(ndata[i])-1] *= -1;
		}
		if (n % 2 == 1 || num > n / 2) {
			out.println("NO");
			out.flush();
			return;
		}

		try {
			solve(0, n-1, a);
		} catch (Exception e) {
			isok = false;
		}
		if (!isok) {
			out.println("NO");
		} else {
			out.println("YES");
			StringBuffer b = new StringBuffer();
			for (int i = 0 ; i < n ; i++) {
				b.append(a[i]).append(" ");
			}
			out.println(b.substring(0, b.length()-1));
		}
		out.flush();
	}

	static boolean isok = true;

	private static void solve(int i, int j, int[] a) throws Exception {
		if (i >= j) {
			return;
		}
		int f = i;
		int t = j;
		while (Math.abs(a[j]) != a[i] && i < j) {
			j -= 2;
		}
		if (j <= i) {
			throw new Exception();
		}
		if (a[j] >= 1) {
			a[j] *= -1;
		}
		solve(f+1, j-1, a);
		solve(j+1, t, a);
	}

	public static void debug(Object... o) {
		System.err.println(Arrays.deepToString(o));
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeSet;

public class ProblemC {

	static Map<Integer, TreeSet<Integer>> sameAbs = new HashMap<Integer, TreeSet<Integer>>();
	static Map<Integer, TreeSet<Integer>> sameNeg = new HashMap<Integer, TreeSet<Integer>>();

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);

		int n = Integer.valueOf(in.readLine());
		String[] ai = in.readLine().split(" ");
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = Integer.valueOf(ai[i]);
		}
		String[] ndata = in.readLine().split(" ");
		int num = Integer.valueOf(ndata[0]);
		for (int i = 1 ; i <= num ; i++) {
			a[Integer.valueOf(ndata[i])-1] *= -1;
		}
		if (n % 2 == 1 || num > n / 2) {
			out.println("NO");
			out.flush();
			return;
		}

		sameAbs = new HashMap<Integer, TreeSet<Integer>>();
		sameNeg = new HashMap<Integer, TreeSet<Integer>>();
		for (int i = 0 ; i < n ; i++) {
			int ab = Math.abs(a[i]);
			if (!sameAbs.containsKey(ab)) {
				sameAbs.put(ab, new TreeSet<Integer>());
			}
			sameAbs.get(ab).add(i);
			if (a[i] <= -1) {
				if (!sameNeg.containsKey(ab)) {
					sameNeg.put(ab, new TreeSet<Integer>());
				}
				sameNeg.get(ab).add(i);
			}
		}

		try {
			solve(0, n-1, a);
		} catch (Exception e) {
			isok = false;
		}
		if (!isok) {
			out.println("NO");
		} else {
			out.println("YES");
			StringBuffer b = new StringBuffer();
			for (int i = 0 ; i < n ; i++) {
				b.append(a[i]).append(" ");
			}
			out.println(b.substring(0, b.length()-1));
		}
		out.flush();
	}

	static boolean isok = true;

	private static void solve(int i, int j, int[] a) throws Exception {
		if (i >= j) {
			return;
		}
		if (a[i] <= -1) {
			throw new Exception();
		}
		int f = i;
		int t = j;
		int bj = -1;
		j = -1;
		int ab = Math.abs(a[i]);
		if (sameAbs.get(ab) == null) {
			throw new Exception();
		}
		if (!(sameNeg.get(ab) == null)) {
			j = sameNeg.get(ab).pollLast();
		}
		bj = sameAbs.get(ab).pollLast();

		if (i >= j) {
			j = bj;
			if (i >= j) {
				throw new Exception();
			}
			if (a[j] >= 1) {
				a[j] *= -1;
			}
			solve(f+1, j-1, a);
			solve(j+1, t, a);
		} else {
			solve(f+1, j-1, a);
			solve(j+1, t, a);
		}
	}

	public static void debug(Object... o) {
		System.err.println(Arrays.deepToString(o));
	}
}