#include<iostream>
#include<queue>
#include<memory.h>
using namespace std;
class P{
public :
	int c, x, y;
	bool flag;
	P(int a,int b,int d){
		x = a;
		y = b;
		c = d;
	}
};
int main()
{
	int dx[] = { -2, -2, -2, -1, -1, 0, 0, 1, 1, 2, 2, 2 };
	int dy[] = { -1, 0, 1, -2, 2, -2, 2, -2, 2, -1, 0, 1 };
	bool map[10][10][10];
	int px,py,n,x,y;
	while (true){
		memset(map, 0, sizeof(map));
		cin >> px >> py;
		if (!px&&!py)break;
		cin >> n;
		for (int i = 0; i < n; i++){
			cin >> x >> y;
			for (int i2 = -1; i2 < 2; i2++){
				for (int i3 = -1; i3 < 2; i3++){
					int xx = x + i2;
					int yy = y + i3;
					if (xx >= 0 && xx <= 10 && yy >= 0 && yy <= 10){
						map[xx][yy][i] = true;
					}
				}
			}
		}
		queue<P>p;
		p.push(P(px, py, -1));
		bool flag = false;
		while (!p.empty()){
			P q = p.front();
			p.pop();
			if (q.c == n - 1){
				flag = true;
				break;
			}
			for (int i = 0; i < 12; i++){
				int xx = q.x + dx[i];
				int yy = q.y + dy[i];
				if (xx >= 0 && xx < 10 && yy >= 0 && yy < 10 && map[xx][yy][q.c + 1]){
					p.push(P(xx, yy, q.c + 1));
					map[xx][yy][q.c + 1] = false;
				}
			}
		}
		if (flag){
			cout << "OK" << endl;
		}
		else{
			cout << "NA" << endl;
		}
	}
	
}