#include "bits/stdc++.h"
using namespace std;

//#define int long long
#define DEBUG 0
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(a) (a).begin(),(a).end()
#define dump(o) if(DEBUG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DEBUG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
using pii = pair<int, int>; using vi = vector<int>;
static const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
static const int MOD = (int)(1e9 + 7);

signed main() {
	vector<int> area_px = { 2,2,2,0,1,-1, -2,-2,-2,0,1,-1 };
	vector<int> area_py = { 0,1,-1,2,2,2, 0,1,-1,-2,-2,-2 };
	for (int px, py; cin >> px >> py && !(px == 0 && py == 0);) {
		int n; cin >> n;
		vi x(n), y(n);
		rep(i, 0, n)cin >> x[i] >> y[i];
		queue<pii> cur, next;
		cur.emplace(px, py);
		rep(i, 0, n) {
			while (!cur.empty()) {
				pii p = cur.front(); cur.pop();
				rep(j, 0, area_px.size()) {
					int xx = p.first + area_px[j];
					int yy = p.second + area_py[j];
					if (x[i] - 1 <= xx && xx <= x[i] + 1 && y[i] - 1 <= yy && yy <= y[i] + 1) {
						next.emplace(xx, yy);
					}
				}
			}
			swap(cur, next);
		}
		dump(cur.size());
		if (cur.size())cout << "OK" << endl;
		else cout << "NA" << endl;
	}
	return 0;
}