#include<iostream>
#include<cstdio>
#include<queue>
using namespace std;

struct Data{
	int y, x, dep;
	Data(){
		dep = 0;
	}
};

int main(){
	int n, x_sp[10], y_sp[10];
	Data s;
	int nx_phon[13] = { 0, 0, 1, 2, 2, 2, 1, 0, -1, -2, -2, -2, -1 },
		ny_phon[13] = { 0, -2, -2, -1, 0, 1, 2, 2, 2, 1, 0, -1, -2 };
	int nx_sp[9] = { 0, 0, 1, 1, 1, 0, -1, -1, -1 },
		ny_sp[9] = { 0, -1, -1, 0, 1, 1, 1, 0, -1 };

	while (cin >> s.x >> s.y, s.x != 0 || s.y != 0){
		cin >> n;
		for (int i = 0; i < n; i++){
			cin >> x_sp[i] >> y_sp[i];
		}

		queue<Data> q;
		q.push(s);
		Data q_c, q_d;
		int px_phon, py_phon, px_sp, py_sp, ans = false;
		bool frst = true;
		while (!q.empty()){
			bool memo[10][10] = {};
			q_c = q.front();
			q.pop();
			for (int i = 0; i < 13; i++){
				px_phon = q_c.x + nx_phon[i];
				py_phon = q_c.y + ny_phon[i];
				if (px_phon < 0 || 9 < px_phon || py_phon < 0 || 9 < py_phon) continue;
				for (int j = 0; j < 9; j++){
					px_sp = x_sp[q_c.dep] + nx_sp[j];
					py_sp = y_sp[q_c.dep] + ny_sp[j];
					if (px_sp < 0 || 9 < px_sp || py_sp < 0 || 9 < py_sp) continue;
					//if (memo[px_sp][py_sp])continue;
					if (px_phon == px_sp && py_phon == py_sp){
						//printf("%d",q_c.dep);
						if (q_c.dep == 0 && !frst){
							ans = true;
							goto END;
						}
						memo[px_sp][py_sp] = true;
						q_d.x = px_sp; q_d.y = py_sp; q_d.dep = q_c.dep + 1;
						if (q_d.dep == n){
							q_d.dep = 0;
							frst = false;
						}
						q.push(q_d);
						break;
					}
				}
			}
		}
		END:
		if (ans) printf("OK\n");
		else printf("NA\n");
	}
	return 0;
}