#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <math.h>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
#include <bitset>
using namespace std;
#define rep(I,N) for(int I = 0; I < (int)(N); I++)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;
int StrToInt(string);
string IntToStr(int);
int dx[12] = {2, 2, 2, 1, 0, -1, -2, -2, -2, -1, 0, 1};
int dy[12] = {1, 0, -1, -2, -2, -2, -1, 0, 1, 2, 2, 2};
int main(void){
	int px, py, N;
	while(cin >> px >> py && (px||py)){
		int pyon = (9*py+px);
		cin >> N;
		int spr[11];
		rep(i, N){
			int a, b;
			cin >> a >> b;
			spr[i] = (9*b)+a;
		}
		bool flag = false;
		queue<P> que;
		que.push(P(pyon, 0));
		while(!que.empty()){
			P p = que.front();
			que.pop();
			int x = p.first%9;
			int y = p.first/9;
			int spX = spr[p.second]%9;
			int spY = spr[p.second]/9;
			if(p.second == N){
				flag = true;
				break;
			}
			rep(i, 12){
				int nx = x+dx[i];
				int ny = y+dy[i];
				if(nx == spX && ny == spY)continue;
				if(nx >= 0 && nx < 10 && ny >= 0 && ny < 10){
					if( abs(spX-nx) <= 1 && abs(spY-ny) <= 1){
						que.push(P(((9*ny)+nx), p.second+1));
					}
				}
			}
		}
		cout << (flag?"OK":"NA") << endl;
	}
	return 0;
}



int StrToInt(string s){
	stringstream ss;
	ss << s;
	int val;
	ss >> val;
	return val;
}
string IntToStr(int i){
	stringstream ss;
	ss << i;
	return ss.str();
}