#include <cstdio>
#include <cstdlib>
using namespace std;

struct POINT
{
	int x;
	int y;
};

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

POINT sp[10];
int n;

bool Search(int i, int x, int y)
{	
	bool f = false;
	
//	printf("%d %d\n", x, y);
	
	if (i == n){
		return true;
	}
	
	for (int j = 0; j < 12; j++){		
		if (abs(x + dx[j] - sp[i].x) <= 1 && abs(y + dy[j] - sp[i].y) <= 1
		&& (x + dx[j] >= 0 && x + dx[j] <= 9 && y + dy[j] >= 0 && y + dy[j] <= 9)){
			if (Search(i + 1, x + dx[j], y + dy[j])){
				f = true;
				break;
			}
		}
	}
	
	return f;
}

int main()
{
	POINT def;
	
	while (scanf("%d %d", &def.x, &def.y), def.x + def.y){
		scanf("%d", &n);
		
		for (int i = 0; i < n; i++){
			scanf("%d %d", &sp[i].x, &sp[i].y);
		}
		
		printf(Search(0, def.x, def.y) ? "OK\n" : "NA\n");
	}
	
	return 0;
}