import java.util.Arrays;

import ru.ifmo.testlib.*;
import ru.ifmo.testlib.Outcome.Type;

public class Check implements Checker {

	@Override
	public Outcome test(InStream inf, InStream ouf, InStream ans) 
	{
		int n = inf.nextInt();
		int[] a = new int[n];
		int[] b = new int[n];
		for (int i = 0; i < n; i++) 
			a[i] = inf.nextInt();
		
		for (int i = 0; i < n; i++)
			b[i] = inf.nextInt();
		
 		long partAns_a = 0;
		long partAns_b = 0;
		long juryAns_a = 0;
		long juryAns_b = 0;
		int juryK, partK;
		
		juryK = ans.nextInt();
		partK = ouf.nextInt();
		
		if (juryK > 10000 || juryK < -1 || juryK == 0)
		{
			return new Outcome(Type.FAIL, "K is more than required");	
		}

		if (partK > 10000 || partK < -1 || partK == 0)
		{
			return new Outcome(Type.WA, "K is more than required");
		}

		if (partK == -1 && juryK != -1)
		{
			return new Outcome(Type.WA, "There is solution");
		}

		int index;
		
		for (int i = 0; i < juryK; i++)
		{
			index = ans.nextInt();
			if (index > n || index <= 0) 
			{
				return new Outcome(Type.FAIL, "Index out of range");
			}

			juryAns_a += a[index - 1];
			juryAns_b += b[index - 1];
		}
		
		if (juryAns_a != juryAns_b) 
		{
			return new Outcome(Type.FAIL, "Sum does not match!");
		}
		
		for (int i = 0; i < partK; i++)
		{
			index = ouf.nextInt();
			if (index > n || index <= 0) 
			{
				return new Outcome(Type.WA, "Index out of range");
			}
			partAns_a += a[index - 1];
			partAns_b += b[index - 1];
		}
		
		if (partAns_a != partAns_b) 
		{
			return new Outcome(Type.WA, "Sum does not match!");
		}
		
		return new Outcome(Type.OK, "oK");
	}
}
