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

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

	static final double EPS = 2e-6;
	static final double INF = 1e6;

	static int compare(double pa, double ja) {
		return Math.abs(pa - ja) < EPS || Math.abs(pa - ja) / Math.abs(ja) < EPS ? 0 : Double.compare(pa, ja);
	}

	@Override
	public Outcome test(InStream inf, InStream ouf, InStream ans) {
		int n = inf.nextInt();
		int m = inf.nextInt();
		int k = inf.nextInt();
		double ja = ans.nextDouble();
		double pa = ouf.nextDouble();
		if (compare(pa, -1) != 0 && pa < 0) {
			return new Outcome(Type.WA, "Participant's distance is negative");
		}
		if (ja < 0) {
			ja = INF;
		}
		if (pa < 0) {
			pa = INF;
		}
		if (compare(pa, ja) < 0) {
			return new Outcome(Type.WA,
					"Participant didn't find an optimal solution");
		}
		int[] x = new int[n + m];
		int[] y = new int[n + m];
		for (int i = 0; i < n + m; i++) {
			x[i] = inf.nextInt();
			y[i] = inf.nextInt();
		}
		boolean[] has = new boolean[n + m];
		for (int i = 0; i < k; i++) {
			int id = ouf.nextInt();
			if (id < 1 || id > n + m) {
				return new Outcome(Type.WA, "Superhero id should be in range [1, " + (n + m) + "], but found id = " + id);
			}
			if (has[id - 1]) {
				return new Outcome(Type.WA, "Duplicate superhero ids in output file");
			}
			has[id - 1] = true;
		}
		for (int i = 0; i < n; i++) {
			if (!has[i]) {
				continue;
			}
			for (int j = n; j < n + m; j++) {
				if (!has[j]) {
					continue;
				}
				double dx = x[i] - x[j];
				double dy = y[i] - y[j];
				double dist = Math.sqrt(dx * dx + dy * dy);
				if (compare(dist, pa) < 0) {
					return new Outcome(Type.WA, "Two different type superheros with ids equal to " + (i + 1) + " and " + (j + 1)
													+ " are too close to each other");
				}
			}
		}
		if (compare(ja, pa) < 0) {
			return new Outcome(Type.FAIL,
					"Unbelievable, participant found better answer: " + pa + " instead of " + ja);
		}
		return new Outcome(Type.OK, "OK, Participant did a good job");
	}
}
