#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm>
#include <numeric>
#include <typeinfo>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <ctime>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

string solve(pii f,vector<pii> w)
{
	int di[]={-2,-2,-2,2,2,2,-1,0,1,-1,0,1};
	int dj[]={-1,0,1,-1,0,1,-2,-2,-2,2,2,2};
	int n=w.size();
	queue<pair<int,pii> > q;
	rep(i,12)
		q.push(mp(0,mp(f.first+di[i],f.second+dj[i])));
	while(q.size()){
		int cur=q.front().first;
		pii curp=q.front().second;
		q.pop();
		if(cur==n)
			return "OK";
		int curi=curp.first,curj=curp.second;
		if(curi<0 || 10<=curi || curj<0 || 10<=curj)
			continue;
		if(max(abs(curi-w[cur].first),abs(curj-w[cur].second))>1)
			continue;
		rep(i,12)
			q.push(mp(cur+1,mp(curi+di[i],curj+dj[i])));
	}
	return "NA";
}

int main()
{
	for(pii f;cin>>f.first>>f.second,f.first|f.second;){
		int n;
		cin>>n;
		vector<pii> w(n);
		rep(i,n)
			cin>>w[i].first>>w[i].second;
		cout<<solve(f,w)<<endl;
	}
	
	return 0;
}