#include<iostream>
#include<utility>
#include<vector>
#include<algorithm>
#include<cstdlib>
using namespace std;

int n;
int spx[10],spy[10];

int main(){
	int x,y;
	while(cin>>x>>y,x|y){
		vector<pair<int,int> > a,b;
		cin>>n;
		for(int i=0;i<n;i++)cin>>spx[i]>>spy[i];
		a.push_back(make_pair(x,y));
		for(int i=0;i<n;i++){
			for(int j=0;j<a.size();j++){
				for(int dx=-2;dx<=2;dx++){
					for(int dy=-2;dy<=2;dy++){
						if(abs(dx)==2&&abs(dy)==2 || abs(dx)!=2&&abs(dy)!=2)continue;
						int nx=a[j].first+dx, ny=a[j].second+dy;
						if(abs(nx-spx[i])<=1 && abs(ny-spy[i])<=1){
							b.push_back(make_pair(nx,ny));
						}
					}
				}
			}
			a.clear();
			a.swap(b);
		}
		cout<<(a.empty()?"NA":"OK")<<endl;
	}
	return 0;
}