
#include <stdio.h>
#include <limits.h>
#include <math.h>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) cerr << #x << "=" << static_cast<bitset<16> >(x) << endl;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)
#define if_range(x, y, w, h) if (0<=(int)(x) && (int)(x)<(int)(w) && 0<=(int)(y) && (int)(y)<(int)(h))

const int INF = 100000000;
typedef double D;
const double EPS = 1e-8;
const double PI = 3.14159;
//int dx[4]={-1, 0, 1, 0}, dy[4]={0, -1, 0, 1};
using namespace std;
typedef pair<int, int> P;

/** Problem0122 : Sumer of Phyonkichi **/
int dx[12] = {-1, 0, 1, -2, 2, -2, 2, -2, 2, -1, 0, 1},
dy[12] = {-2, -2, -2, -1, -1, 0, 0, 1, 1, 2, 2, 2};
int N;
vector<P> p;


bool dfs(int px, int py, int k)
{
	//printf("(%d, %d)\n", px, py);
	if (k>=N) return true;
	
	bool res = false;
	for (int y=-1; y<=1; y++) {
		for (int x=-1; x<=1; x++) {
			for (int i=0; i<12; i++) {
				int nx = px+dx[i], ny = py+dy[i];
				int sx = p[k].first+x, sy = p[k].second+y;
				
				if_range(nx, ny, 10, 10) {
					if_range(sx, sy, 10, 10) {
						if (nx == sx && ny == sy) {
							res |= dfs(nx, ny, k+1);
						}
					}
				}
			}
		}
	}
	
	return res;
}


int main()
{
	P s;
	
	while (cin>>s.first>>s.second, s.first||s.second) {
		cin>>N;
		p.clear();
		
		rep(i, N) {
			int x, y;
			cin>>x>>y;
			p.push_back(P(x, y));
		}
		
		cout << (dfs(s.first, s.second, 0)?"OK":"NA") << endl;
	}
}