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

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

public class Check implements ru.ifmo.testlib.Checker {
	public class Point {
		int x, y;

		Point(int x, int y) {
			super();
			this.x = x;
			this.y = y;
		}

	}

	@Override
	public Outcome test(InStream inf, InStream ouf, InStream ans) {
		int h = inf.nextInt(), w = inf.nextInt(), n = inf.nextInt();
		Point[] lights = new Point[n];
		for (int i = 0; i < n; i++) {
			lights[i] = new Point(inf.nextInt() - 1, inf.nextInt() - 1);
		}

        int j = ans.nextInt();
        int p = ouf.nextInt();
		Point pLights = new Point(ouf.nextInt() - 1, ouf.nextInt() - 1);
		Point jLights = new Point(ans.nextInt() - 1, ans.nextInt() - 1);

		if (!isField(pLights.x, pLights.y, h, w))
			return new Outcome(Type.WA, "Light outside the field!");
		if (!isField(jLights.x, jLights.y, h, w))
			return new Outcome(Type.FAIL, "Light outside the field!");

		int jAns = calc(lights, h, w, jLights);
		int pAns = calc(lights, h, w, pLights);
        if (pAns != p)
        	return new Outcome(Type.WA, "You light doesn't make illumination. Found: " + p +", but calculated: " + pAns);
		if (jAns < pAns)
			return new Outcome(Type.WA, "Jury have batter answer");
		
		if (jAns != j)
        	return new Outcome(Type.WA, "You light doesn't make illumination. Found: " + j +", but calculated: " + jAns);
		if (pAns < jAns)
			return new Outcome(Type.FAIL, "OLOLO!!! Pechal'ka!!!!!");

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

	public boolean isField(int x, int y, int h, int w) {
		return (0 <= x && x < h && 0 <= y && y < w);
	}

	public final static int[] dx = { 0, 1, 0, -1 };
	public final static int[] dy = { 1, 0, -1, 0 };

	public int calc(Point[] lights, int h, int w, Point light) {
		int[][] d = new int[h][w];
		for (int i = 0; i < h; i++)
			Arrays.fill(d[i], (int) 1e6);
		Queue<Point> q = new ArrayDeque<Point>();
		q.add(light);
		d[light.x][light.y] = 0;
		for (int i = 0; i < lights.length; i++) {
			d[lights[i].x][lights[i].y] = 0;
			q.add(lights[i]);
		}
		while (!q.isEmpty()) {
			Point p = q.poll();
			for (int dir = 0; dir < 4; dir++) {
				if (isField(p.x + dx[dir], p.y + dy[dir], h, w))
					if (d[p.x + dx[dir]][p.y + dy[dir]] > d[p.x][p.y] + 1) {
						d[p.x + dx[dir]][p.y + dy[dir]] = d[p.x][p.y] + 1;
						q.add(new Point(p.x + dx[dir], p.y + dy[dir]));
					}
			}
		}
		int ans = 0;
		for (int i = 0; i < h; i++)
			for (int j = 0; j < w; j++)
				ans = Math.max(ans, d[i][j]);
		return ans;
	}
}
