#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int dx[]={ 0, 0, 1, 1,-1,-1, 2,-2,-2, 2,-2, 2};
int dy[]={ 2,-2, 2,-2, 2,-2, 0, 0, 1, 1,-1,-1};

int sx[]={ 0, 1,-1, 0, 0, 1, 1,-1,-1};
int sy[]={ 0, 0, 0, 1,-1, 1,-1, 1,-1};

class NODE{
 public:
  int x;
  int y;
  int pos;
};
bool check(int x,int y){
	return (x>=0 && x<10 && y>=0 && y<10);
}
int main(){
	int x,y,n,a,b;
	NODE q,qt;
	vector<int> t;
	while(cin >> x >> y && x || y){
		bool flag = false;
		vector<int> all[10][10];
		cin >> n;
		rep(i,n){
			cin >> a >> b;
			rep(j,9){
				if(check(a+sx[j],b+sy[j]))
					all[a+sx[j]][b+sy[j]].push_back(i+1);
			}
		}
		queue<NODE> Q;
		q.x=x;q.y=y;
		q.pos=0;
		Q.push(q);
		while(Q.size()){
			q = Q.front();Q.pop();
			if(q.pos == 10){
				flag = true;
				break;
			}
			rep(i,12){
				if(check(q.x+dx[i],q.y+dy[i])){
					t = all[q.x+dx[i]][q.y+dy[i]];
					if(count(t.begin(),t.end(),q.pos+1)){
						qt.x = q.x+dx[i];
						qt.y = q.y+dy[i];
						qt.pos = q.pos+1;
						Q.push(qt);
					}
				}
			}
		}
		cout << (flag?"OK":"NA") << endl;
	}
} 