#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <queue>
#include <vector>
#include <sstream>

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;
struct stt{
	int x,y,p;
	stt(int x, int y, int p) : x(x), y(y), p(p) {}
};

int main(void){

int px, py, n;
int sx[10], sy[10];
int pdx[]={-2,-2,-2,-1, 0, 1, 2, 2, 2,-1, 0, 1};
int pdy[]={-1, 0, 1,-2,-2,-2,-1, 0, 1, 2, 2, 2};
int sdx[]={-1,-1,-1, 1, 1, 1, 0, 0, 0};
int sdy[]={-1, 0, 1,-1, 0, 1,-1, 1, 0};
int cnt=0;

	while(cin >> px >> py){
		if(px==0 && py==0 || cin.eof()) break;
		cin >>n;
		rep(i,n){
			cin >> sx[i];
			cin >> sy[i];
		}
		bool use[10][10][10]={false};
		queue< stt > qq;
		qq.push(stt(px,py,0));
		bool lvf=false;
		while(!qq.empty()){
			stt cr = qq.front();
			qq.pop();
//			if( use[cr.x][cr.y][cr.p] ) continue;
			use[cr.x][cr.y][cr.p]=true;
			cnt++;
			rep(i,12){
				stt nx = cr;
				nx.x += pdx[i]; nx.y +=pdy[i]; nx.p++;
				if( nx.x < 0 || nx.x > 9 ) continue;
				if( nx.y < 0 || nx.y > 9 ) continue;
				rep(j,9){
					int wx = sx[cr.p] + sdx[j];
					int wy = sy[cr.p] + sdy[j];
					if(wx == nx.x && wy == nx.y){
						qq.push(nx);
						if(nx.p>=n){ lvf = true; break; } 
					}
				
				}
			}	
		}
		cout << (lvf? "OK": "NA") << endl;
//		printf("ct=%d\n",cnt);
	}
	
	
	return 0;
	
}