#include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

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

bool G[100][10];

int main() {
	int pyonX, pyonY, n;
	while(cin >> pyonX >> pyonY, pyonX|pyonY){
		fill_n((bool *)G, 100*10, false);
		cin >> n;
		vi water;
		REP(i, n){
			int x, y;
			cin >> x >> y;
			water.push_back(y * 10 + x);
		}

		queue<int> que;
		que.push(pyonY * 10 + pyonX);
		que.push(0);
		int step = 0;
		while(1){
			int p = que.front(); que.pop();
			if(p == 0){
				step++;
				if(step == n){
					if(que.empty()){
						cout << "NA" << endl;
						break;
					}
					cout << "OK" << endl;
					break;
				}
				if(que.empty()){
					cout << "NA" << endl;
					break;
				}

				que.push(p);
				continue;
			}
			int y = p/10;
			int x = p%10;

			REP(i, 12){
				int sx = x + dx[i];
				int sy = y + dy[i];
				if(sx < 0 || sx >= 10 || sy < 0 || sy >> 10)
					continue;

				int waterY = water[step]/10;
				int waterX = water[step]%10;
				if(abs(waterX - sx) <= 1 && abs(waterY - sy) <= 1){
					if (G[sy*10+sx][step] != true){
						G[sy*10+sx][step] = true;
						que.push(sy*10+sx);
					}
				}
			}
		}
	}
}