#include <iostream>
using namespace std;

const int w = 10;
const int h = 10;
int m[10][10];

int dx[12] = {-1,0,1,-2,-2,-2,2,2,2,-1,0,1};
int dy[12] = {-2,-2,-2,-1,0,1,-1,0,1,2,2,2};

int n;
bool ans;

void solve(int x, int y, int cnt){
	if( ans ) return;
	
	if( cnt == n+1 ){
		ans = true;
		return ;
	}
	
	for(int i=0 ; i < 12 ; i++ ){
		int mx = x + dx[i];
		int my = y + dy[i];
		if( mx < 0 || my < 0 || mx >= w || my >= h ) continue;
		if( m[my][mx] == cnt ){
			solve( mx , my , cnt+1 );
		}
	}
}

int main(){
	int sx, sy;
	while( cin >> sx >> sy , sx || sy ){
		// ツ渉可甘コツ可サ
		for(int y=0 ; y < h ; y++ ){
			for(int x=0 ; x < w ; x++ ){
				m[y][x] = 0;
			}
		}
		
		cin >> n;
		for(int i=0 ; i < n ; i++ ){
			int x, y;
			cin >> x >> y;
			for(int dy = -1 ; dy <= 1 ; dy++ ){
				for(int dx = -1 ; dx <= 1 ; dx++ ){
					int mx = x + dx;
					int my = y + dy;
					if( mx < 0 || my < 0 || mx >= w || my >= h ) continue;
					m[my][mx] = i+1;
				}
			}
		}
		ans = false;
		solve( sx , sy , 1 );
		if( ans ){
			cout << "OK" << endl;
		}else{
			cout << "NA" << endl;
		}
	}
}