#include <cstdio>
#include <queue>
#include <algorithm>

using namespace std;

struct Event {
	int ty, tx;
	int t;
	Event(){}
	Event(int ty, int tx, int t) : ty(ty), tx(tx), t(t){}
};

bool reach[16][16][16];

int main()
{
	int sy, sx;
	int ty[10], tx[10];
	int n;
	int dx[] = {-1, 0, 1, -2, 2, -2, 2, -2, 2, -1, 0, 1};
	int dy[] = {2, 2, 2, 1, 1, 0, 0, -1, -1, -2, -2, -2};
	
	while (scanf("%d %d", &sx, &sy) && sy){
		scanf("%d", &n);
		if (n == 0) puts("NA");
		
		for (int t = 0; t < n; t++){
			scanf("%d %d", tx + t, ty + t);
		}
		
		queue<Event> q;
		
		bool flag = false;
		for (q.push(Event(sy, sx, 0)); q.size(); q.pop()){
			Event x = q.front();
			if (x.t == n){
				puts("OK");
				flag = 1;
				break;
			}
			for (int i = 0; i < 12; i++){
				int ny = x.ty + dy[i], nx = x.tx + dx[i];
				if (ny < 0 || ny > 9 || nx < 0 || nx > 9) continue;
				if (abs(ny - ty[x.t]) <= 1 && abs(nx - tx[x.t]) <= 1){
					q.push(Event(ny, nx, x.t + 1));
				}
			}
		}
		if (!flag) puts("NA");
	}
	
	return (0);
}