#include<vector>
#include<map>
#define rep(i,n) for(int i=0;i<n;i++)
#define ck(a) (0<=(a)&&(a)<9)
using namespace std;
int pdx[]={-2,-2,-2,-1,-1,0,0,1,1,2,2,2},pdy[]={-1,0,1,-2,2,-2,2,-2,2,-1,0,1},
sdx[]={-1,-1,-1,0,0,0,1,1,1},sdy[]={-1,0,1,-1,0,1,-1,0,1};

int main(){
	int x,y,n;
	while(cin>>x>>y,x||y){
		cin>>n; int sx[10],sy[10];
		rep(i,n)cin>>sx[i]>>sy[i];
		vector<pair<int,int> > pos,next;
		pos.push_back(make_pair(y,x));
		for(int i=0;i<n&&!pos.empty();i++){
			int safe[9][9]={0};
			rep(d,9)if(ck(sx[i]+sdx[d])&&ck(sy[i]+sdy[d]))
			safe[sy[i]+sdy[d]][sx[i]+sdx[d]]=1;
			rep(j,pos.size())rep(d,12)if(ck(pos[j].first+pdy[d])&&
				ck(pos[j].second+pdx[d])&&safe[pos[j].first+pdy[d]][pos[j].second+pdx[d]]
			)next.push_back(make_pair(pos[j].first+pdy[d],pos[j].second+pdx[d]));
			pos=next,next.clear();
		}
		cout<<(pos.empty()?"NA":"OK")<<endl;
	}
	return 0;
}