#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <iterator>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

struct P
{
	int x, y;
	P() : x(0), y(0) {}
	P(int x, int y) : x(x), y(y){}
};
P operator + (P& a, P& b)
{	return P(a.x + b.x, a.y + b.y);	}

P dp[] = {P(-2, -1), P(-2, 0), P(-2, 1), P(-1, 2), P(0, 2), P(1, 2), P(2, 1), P(2, 0), P(2, -1), P(1, -2), P(0, -2), P(-1, -2)};
int n;

inline bool range(P& s, P& p)
{
	return (0 <= p.x && p.x < 10 && 0 <= p.y && p.y < 10) && (s.x - 1 <= p.x && p.x <= s.x + 1 && s.y - 1 <= p.y && p.y <= s.y + 1);
}

bool rec(vector<P>& s, int ns, P p)
{
	if(ns == n) return true;
	
	
	bool res = false;
	
	rep(i, 12)
	{
		P np = p + dp[i];
		
		if(range(s[ns], np))
		{
			res |= rec(s, ns + 1, np);
		}
	}
	
	return res;
}

int main()
{
    P p;
	while(cin >> p.x >> p.y && (p.x || p.y))
	{
		cin >> n;
		
		vector<P> s(n);
		rep(i, n) cin >> s[i].x >> s[i].y;
		
		cout << (rec(s, 0, p) ? "OK" : "NA") << endl;
	}
}