#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <cstdio>
#include <queue>
#include <stack>
#include <map>
#include <set>

#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define all(v) (v).begin(), (v).end()
#define rev(s) string((s).rbegin(), (s).rend())
#define MP make_pair
#define X first
#define Y second

using namespace std;

typedef long long int ll;
typedef pair<int, int> P;


int main(){
	while(1){
		int sx, sy;
		cin >> sx >> sy;

		if(!sx && !sy) return 0;

		int n;
		cin >> n;

		int field[12][10][10] = {};
		FOR(i, 1, n+1){
			int x, y;
			cin >> x >> y;
			for(int j = x-1; j <= x+1; j++){
				for(int k = y-1; k <= y+1; k++){
					if(j < 0 || j > 9 || k < 0 || k > 9)continue;
					field[i][k][j] = 1;
				}
			}
		}
		rep(i, 10){
			rep(j, 10){
				field[n+1][i][j] = 1;
			}
		}


		//rep(i, n+2){
		//	rep(j, 10){
		//		rep(k, 10){
		//			cout << field[i][j][k];
		//		}
		//		cout << endl;
		//	}
		//	cout << endl;
		//}

		typedef pair<int, P> POS;

		queue<POS> q;
		q.push(MP(0, MP(sx, sy)));

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

		while(!q.empty()){
			int next = q.front().first+1;
			if(next == n+1){
				ok = true;
				break;
			}
			P p = q.front().second;
			q.pop();
			rep(i, 12){
				int x = p.X + dx[i];
				int y = p.Y + dy[i];
				
				if(x < 0 || x > 9 || y < 0 || y > 9) continue;
				if(field[next][y][x] == 0) continue;
				q.push(MP(next, MP(x, y)));
			}			
		}
		cout << (ok?"OK":"NA") << endl;

	}
	return 0;
}