#include<iostream>
#include<cmath>
using namespace std;

int dp[30][30][30];
int x[30], y[30], p[30][30];
int n;
int X, Y;

void A(int B, int C, int D) {
	if (p[C][D] == 0) {
		dp[B + 1][C][D] = 1;
	}
}

int main() {
	while (true) {
		cin >> X >> Y;
		if (X == 0 && Y == 0) {
			break;
		}
		for (int i = 0; i < 30; i++) {
			for (int j = 0; j < 30; j++) {
				if (i < 10 || i >= 20 || j < 10 || j >= 20) {
					p[i][j] = 1;
				}
				else {
					p[i][j] = 0;
				}
			}
		}
		for (int i = 0; i < 30; i++) {
			for (int j = 0; j < 30; j++) {
				for (int k = 0; k < 30; k++) {
					dp[i][j][k] = 0;
				}
			}
		}
		cin >> n;
		for (int i = 0; i < n; i++) {
			cin >> x[i] >> y[i];
			x[i] += 10; y[i] += 10;
		}
		dp[0][X + 10][Y + 10] = 1;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 30; j++) {
				for (int k = 0; k < 30; k++) {
					if (dp[i][j][k] == 1) {
						A(i, j - 2, k - 1);
						A(i, j - 2, k);
						A(i, j - 2, k + 1);
						A(i, j + 2, k - 1);
						A(i, j + 2, k);
						A(i, j + 2, k + 1);
						A(i, j - 1, k - 2);
						A(i, j, k - 2);
						A(i, j + 1, k - 2);
						A(i, j - 1, k + 2);
						A(i, j, k + 2);
						A(i, j + 1, k + 2);
					}
				}
			}
			for (int j = 0; j < 30; j++) {
				for (int k = 0; k < 30; k++) {
					if (abs(x[i] - j) >= 2 || abs(y[i] - k) >= 2) {
						dp[i + 1][j][k] = 0;
					}
				}
			}
		}
		bool ok = false;
		for (int i = 0; i < 30; i++) {
			for (int j = 0; j < 30; j++) {
				if (dp[n][i][j] == 1) {
					ok = true;
				}
			}
		}
		if (ok == true) { cout << "OK" << endl; }
		else { cout << "NA" << endl; }
	}
	return 0;
}