#include <iostream>
#include <vector>

using namespace std;
typedef pair<int, int> P;
vector<P> field;
int dx[] = {-2, -2, -2, -1,  0,  1,  2, 2, 2, 1, 0, -1};
int dy[] = { 1,  0, -1, -2, -2, -2, -1, 0, 1, 2, 2,  2};
bool flag = false;
int num;

void DFS(int y, int x, int n)
{
	if(n == num)
	{
		flag = true;
		return;
	}
	for(int i = 0; i < 12; ++i)
	{
		int X = x + dx[i];
		int Y = y + dy[i];
		for(int sx = -1; sx <= 1; ++sx)
		{
			int SX = field[n].first + sx;
			for(int sy = -1; sy <= 1; ++sy)
			{
				int SY = field[n].second + sy;
				if(2 <= X && X < 12 && 2 <= Y && Y < 12 && X == SX && Y == SY)
				{
					DFS(Y, X, n + 1);
				}
			}
		}
	}
}

void solve()
{
	int x, y;
	while(cin >> x >> y, x || y)
	{
		flag = false;
		field.clear();
		cin >> num;
		field.resize(num);
		for(int i = 0; i < num; ++i)
		{
			cin >> field[i].first >> field[i].second;
			field[i].first += 2;
			field[i].second += 2;
		}
		DFS(y + 2, x + 2, 0);
		if(flag)
		{
			cout << "OK" << endl;	
		}
		else
		{
			cout << "NA" << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}