// 2011/03/05 Tazoe

#include <iostream>
using namespace std;

struct point{
	int x;
	int y;
};

bool DFS(struct point phy, int n, struct point spr[10], int i_main)
{
	if(i_main==n)
		return true;

	struct point phy2[12];
	phy2[0].x  = phy.x-1;  phy2[0].y  = phy.y-2;
	phy2[1].x  = phy.x  ;  phy2[1].y  = phy.y-2;
	phy2[2].x  = phy.x+1;  phy2[2].y  = phy.y-2;
	phy2[3].x  = phy.x+2;  phy2[3].y  = phy.y-1;
	phy2[4].x  = phy.x+2;  phy2[4].y  = phy.y  ;
	phy2[5].x  = phy.x+2;  phy2[5].y  = phy.y+1;
	phy2[6].x  = phy.x+1;  phy2[6].y  = phy.y+2;
	phy2[7].x  = phy.x  ;  phy2[7].y  = phy.y+2;
	phy2[8].x  = phy.x-1;  phy2[8].y  = phy.y+2;
	phy2[9].x  = phy.x-2;  phy2[9].y  = phy.y+1;
	phy2[10].x = phy.x-2;  phy2[10].y = phy.y  ;
	phy2[11].x = phy.x-2;  phy2[11].y = phy.y-1;

	for(int i=0; i<12; i++){
		if(phy2[i].x<0||phy2[i].x>9||phy2[i].y<0||phy2[i].y>9)
			continue;

		for(int j=-1; j<=1; j++)
			for(int k=-1; k<=1; k++)
				if(phy2[i].x==spr[i_main].x+j&&phy2[i].y==spr[i_main].y+k)
					if(DFS(phy2[i], n, spr, i_main+1))
						return true;
	}

	return false;
}

int main()
{
	while(true){
		struct point phy;
		cin >> phy.x >> phy.y;
		if(phy.x==0&&phy.y==0)
			break;

		int n;
		cin >> n;

		struct point spr[10];
		for(int i=0; i<n; i++)
			cin >> spr[i].x >> spr[i].y;

		if(DFS(phy, n, spr, 0))
			cout << "OK" << endl;
		else
			cout << "NA" << endl;
	}

	return 0;
}