#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
using namespace std;
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str();}
typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n-1)
const double EPS = 1e-10;
const double PI = acos(-1.0);

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

int ddx[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
int ddy[] = {1, 1, 1, 0, 0, 0, -1, -1, -1};

struct state {
	int x, y, t;

public:
	state(int xx, int yy, int tt) {
		x = xx;
		y = yy;
		t = tt;
	}
};

int main() {
	int sx, sy;
	int n;
	int a, b;

	while(cin >> sx >> sy, !(sx==0 && sy==0)) {
		vvi field(14, vi(14, 0));
		queue<state> Q;

		Q.push(state(sx+2, sy+2, 0));
		cin >> n;
		
		REP(i, n) {
			cin >> a >> b;
			REP(j, 9) {
				field[a+2+ddx[j]][b+2+ddy[j]] += (1<<i);
			}
		}

		REP(i, 14) {
			field[0][i] = 0;
			field[1][i] = 0;
			field[i][0] = 0;
			field[i][1] = 0;
		}

		string msg = "NA";
		while(!Q.empty()) {
			state s = Q.front();
			Q.pop();
			if(s.t == n) {
				msg = "OK";
				break;
			}

			REP(d, 12) {
				if(field[s.x+dx[d]][s.y+dy[d]]&(1<<s.t)) {
					Q.push(state(s.x+dx[d], s.y+dy[d], s.t+1));
				}
			}
		}

		cout << msg << endl;
	}

	return 0;
}