#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

bool park[10][10];
bool next[10][10];
int x,y;

int xxx[]={-1,0,1,2,2,2,1,0,-1,-2,-2,-2},yyy[]={-2,-2,-2,-1,0,1,2,2,2,1,0,-1};

void f(int a,int b){
	int i;
	for(i=0;i<12;i++){
		if(a+xxx[i]<0)continue;
		if(10<=a+xxx[i])continue;
		if(b+yyy[i]<0)continue;
		if(10<=b+yyy[i])continue;
		if(a+xxx[i]<x-1)continue;
		if(x+1<a+xxx[i])continue;
		if(b+yyy[i]<y-1)continue;
		if(y+1<b+yyy[i])continue;
		next[b+yyy[i]][a+xxx[i]]=true;
	}
	return;
}

int main() {
	int xx,yy,n;
	while(cin>>xx>>yy,xx!=0||yy!=0){
		cin>>n;
		int i;
		for(y=0;y<10;y++){
			for(x=0;x<10;x++){
				park[y][x]=false;
			}
		}
		park[yy][xx]=true;
		for(i=0;i<n;i++){
			for(y=0;y<10;y++){
				for(x=0;x<10;x++){
					next[y][x]=false;
				}
			}
			cin>>x>>y;
			int a,b;
			for(b=0;b<10;b++){
				for(a=0;a<10;a++){
					if(park[b][a]){
						f(a,b);
					}
				}
			}
			for(y=0;y<10;y++){
				for(x=0;x<10;x++){
					park[y][x]=next[y][x];
				}
			}
		}
		bool ok=false;
		for(y=0;y<10;y++){
			for(x=0;x<10;x++){
				if(park[y][x]){
					ok=true;
				}
			}
		}
		cout<<(ok?"OK":"NA")<<endl;
	}
	return 0;
}