#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<cmath>
#include<cstring>
#include<cctype>
#include<complex>
#include<iostream>
#include<sstream>
#include<algorithm>
#include<functional>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<map>
#include<set>
using namespace std;
const int dx[] = {-2,-2,-2,2,2,2,-1,0,1,-1,0,1},dy[] = {0,1,-1,0,1,-1,2,2,2,-2,-2,-2};
#define INF 1e+8
#define EPS 1e-8
#define rep(i,j) for(int i = 0; i < (j); i++)
#define reps(i,j,k) for(int i = (j); i < (k); i++)
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> Pii;
class P{
	public:
	int x,y,next;
	P(int x,int y,int next):x(x),y(y),next(next){}
};
bool check(int stage[15][15],int x,int y,int next){
	const int ddx[]={-1,0,1,-1,0,1,-1,0,1,0},ddy[]={1,1,1,0,0,0,-1,-1,-1,0};
	rep(i,10){
		rep(j,10){
			if(stage[j][i] == next){
				rep(k,10){
					if(i+ddx[k] == x && j+ddy[k] == y)return true;
				}
				return false;
			}
		}
	}
}
int main(){
	int sx,sy;
	while(scanf("%d%d",&sx,&sy),(sx|sy)){
		int n;
		int stage[15][15];
		memset(stage,-1,sizeof(stage));
		scanf("%d",&n);
		rep(i,n){
			int x,y;
			scanf("%d%d",&x,&y);
			stage[y][x] = i;
		}
		bool f = false;
		queue<P> Q;
		Q.push(P(sx,sy,0));
		while( Q.size() ){
			P p = Q.front();Q.pop();
			if(p.next == n){f=true;break;}
			rep(i,12){
				if(p.x+dx[i] > 9 || p.x+dx[i] < 0 || p.y+dy[i] > 9 || p.y+dy[i] < 0 )continue;
				if( check(stage,p.x+dx[i],p.y+dy[i],p.next) ) Q.push(P(p.x+dx[i],p.y+dy[i],p.next+1));
			}
		}
		f ? puts("OK") : puts("NA");
	}
	return 0;
}