#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <map>
#include <complex>
using namespace std;

typedef complex<int> P;

namespace std {
	bool operator < (const P &a, const P &b) {
		if (a.real() == b.real()) return a.imag() < b.imag();
		else return a.real() < b.real();
	}
};


int main() {
	P p_dir[12] = {
		P(2, -1),  P(2, 0),  P(2, 1),
		P(-2, -1), P(-2, 0), P(-2, 1),
		P(-1, 2),  P(0, 2),  P(1, 2),
		P(-1, -2), P(0, -2), P(1, -2),
	};
/*
	P sp_dir[9] = {
		P(-1, -1), P(0, -1), P(1, -1),
		P(-1, 0), P(0, 0), P(1, 0),
		P(-1, 1), P(0, 1), P(1, 1),
	}
*/

	vector<P> now(1);
	while (cin >> now[0].real() >> now[0].imag(), now[0].real() || now[0].imag()) {
		int n; cin >> n;
		vector<P> sp;
		for (int i = 0; i < n; ++i) {
			int x, y; cin >> x >> y;
			sp.push_back( P(x, y) );
		}
		for (int t = 0; t < n; ++t) {
			vector<P> next;
			for (int i = 0; i < now.size(); ++i)
				for (int j = 0; j < 12; ++j) {
					P p = now[i] + p_dir[j];
					if ( abs(p.real() - sp[t].real()) <= 1 && abs(p.imag() - sp[t].imag()) <= 1 )
						next.push_back(p);
				}

			sort( next.begin(), next.end() );
			next.erase( unique( next.begin(), next.end() ), next.end() );
			now = next;
		}
		if (now.size()) cout << "OK" << endl;
		else cout << "NA" << endl;
	}
}