import ru.ifmo.testlib.InStream;
import ru.ifmo.testlib.Outcome;
import ru.ifmo.testlib.Outcome.Type;
import java.util.*;

public class Check implements ru.ifmo.testlib.Checker {

    public int gcd(int a, int b) {
        if (b == 0)
            return a;
        else
            return gcd(b, a % b);
    }

    @Override
    public Outcome test(InStream inf, InStream ouf, InStream ans) {
        int n = inf.nextInt();
        int d = inf.nextInt();

        HashMap<Integer, Integer> count = new HashMap<Integer, Integer>();

        for (int i = 0; i < n; i++) {
            int a = inf.nextInt();
            if (!count.containsKey(a))
                count.put(a, 0);

            int z = count.get(a);
            count.put(a, z + 1);
        }

        int m = ans.nextInt();

        int k = ouf.nextInt();

        if (k == -1 && m == -1) {
            return new Outcome(Type.OK, "There isn't answer!");
        }

        if (k == -1 && m != -1) {
            return new Outcome(Type.WA, "We can choose!");
        }

        if (n < k) {
            return new Outcome(Type.WA, "There are more integers than in input file! " + n + " < " + k);
        }

        int gcd = 0;
        for (int i = 0; i < k; i++) {
            int a = ouf.nextInt();
            if (!count.containsKey(a)) {
                return new Outcome(Type.WA, "There isn't " + a + " in input file!");
            }

            gcd = gcd(a, gcd);

            int z = count.get(a);
            if (z == 0) {                                                                    
                return new Outcome(Type.WA, "There isn't such amount of " + a + " in input file!");
            }
            count.put(a, z - 1);
        }

        if (gcd != d) {
          return new Outcome(Type.WA, "GCD of numbers in output (" + gcd + ") isn't equal to " + d + "!");
        }

        if (k != -1 && m == -1) {
          return new Outcome(Type.FAIL, "There's answer, but jury hasn't!");
        }

        return new Outcome(Type.OK, "Ok. " + k + " numbers!");
    }
}
