#include<cstdio>
#include<cstring>
#include<iostream>
#include<cmath>
#include<cstdlib>
#include<queue>
using namespace std;
int jx[] = {-1,0,1,-2,2,-2,2,-2,2,-1,0,1},jy[] = {-2,-2,-2,-1,-1,0,0,1,1,2,2,2};
int field[16][16] = {{}};
struct data{
	int x,y,cnt;
};
bool check(int x,int y,int cnt){
	for(int i = 0; i < 9; i++){
		for(int j = 0; j < 9; j++){
			if(field[i][j] == cnt)return true;
		}
	}
	return false;
}
int main(){
	int n;
	int sx,sy;
	while(cin >> sx >> sy){
		if(sx == 0 && sy == 0) break;
		cin >> n;
		int x[16] = {},y[16] = {};
		memset(field,0,sizeof(field));
		for(int i = 1; i <= n; i++){
			cin >> x[i] >> y[i];
			field[y[i]][x[i]] = i;
		}
		bool flg = false;
		queue<data> Q;
		data s = {sx,sy,0};
		Q.push(s);
		while(!Q.empty()){
			data d = Q.front();Q.pop();
			if(d.cnt == n && check(d.x,d.y,d.cnt)){
				flg = true;
				break;
			}
			for(int i = 0; i < 12; i++){
				int nx = d.x + jx[i], ny = d.y + jy[i],nc = d.cnt+1;
				if(nx < 0 || ny < 0 || nx >= 10 || ny >= 10) continue;
				if(abs(x[nc]-nx) <= 1 && abs(y[nc]-ny) <= 1){
					data n = {nx,ny,nc};
					Q.push(n);
				}
			}
		}
		cout << (flg?"OK":"NA") << endl;
	}
	return 0;
}