#include <iostream>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <map>
#include <functional>
#include <iomanip>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <typeinfo>
#define PI 3.14159265359
#define INF 99999999
#define rep(i, n) for(int i=0; i<n; i++)
#define REP(n) rep(i, n)
#define EPS 1e-10
#define pb push_back
#define mp make_pair
typedef long long ll;
using namespace std;
typedef pair<int, int> P;

bool isLeap(int y);
ll gcd(ll a, ll b);
ll lcm(ll a, ll b);
double distanceAB(double xa, double ya, double xb, double yb);
void trace(int A[], int N);

/*
class Target
{
public:
	vector <string> draw(int n)
	{

	}
};
*/


class State
{
public:
	int cost, x, y;
	State(int _cost, int _x, int _y)
	{
		cost = _cost;
		x = _x;
		y = _y;
	}
};

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


int main()
{
	int sx, sy;
	
	while (cin >> sx >> sy, sx || sy)
	{
		int n;
		cin >> n;
		
		bool t[10][10][10];
		memset(t, 0, sizeof(t));
		rep(i, n)
		{
			int x, y;
			cin >> x >> y;
			for (int j=-1; j<=1; j++)
			{
				for (int k=-1; k<=1; k++)
				{
					int nx = x + j;
					int ny = y + k;
					if (nx>=0 && nx<10 && ny>=0 && ny<10) t[i][ny][nx] = true;
				}
			}
		}
		
		queue<State> open;
		open.push(State(-1, sx, sy));
		bool ans = false;
		
		if (n == 0)
		{
			cout << "NA" << endl;
			continue;
		}
		
		while (!open.empty())
		{
			State st = open.front(); open.pop();
			if (st.cost == n - 1)
			{
				ans = true;
				break;
			}
			
			rep(i, 12)
			{
				int nx = st.x + dx[i];
				int ny = st.y + dy[i];
				int nc = st.cost + 1;
				if (nx>=0 && nx<10 && ny>=0 && ny<10 && t[nc][ny][nx])
				{
					open.push(State(nc, nx, ny));
					t[nc][ny][nx] = false;
				}
			}
		}
		cout << (ans ? "OK" : "NA") << endl;
	}
	
	return 0;
}


bool isLeap(int y)
{
	return y % 400 == 0
						? true : y % 100 == 0
						? false : y % 4 == 0
						? true : false;
}

ll gcd(ll a, ll b)
{
	return (b > 0) ? gcd(b, a % b) : a;
}

ll lcm(ll a, ll b)
{
	return a / gcd(a, b) * b;
}

void trace(int A[], int N)
{
	REP(N)
	{
		if (i > 0) cout << " ";
		cout << A[i];
	}
	cout << endl;
}

double distanceAB(double xa, double ya, double xb, double yb)
{
	return sqrt((xb-xa)*(xb-xa) + (yb-ya)*(yb-ya));
}