#include<complex>
#include<algorithm>
#include<iostream>
#include<iomanip>
#include<bitset>
#include<cmath>
#include<vector>
#include<map>
#include<sstream>
#include<ctime>
#include<cstdio>
#include<cstdlib>
#include<cassert>
#include<deque>
#include<queue>
#include<climits>
#include<list>
#include<stack>
#include<ctime>
#define all(n) n.begin(),n.end()
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define insert(a,b,c,d) PP(P(a,b),P(c,d))
#define F first
#define S second
#define Iter(c) __typeof__((c).begin())
#define foreach(i,c) for(Iter(c) i = (c).begin();i != (c).end();++i)
#define pb push_back
#define INF (1<<27)
#define EPS 1e-10
#define equals(a,b) (fabs((a)-(b)) < EPS)

using namespace std;
typedef pair<int,int> P;
typedef pair<P,int> Pi;
typedef pair<P,P> PP;
typedef unsigned long long ull;
typedef long long ll;
const int dx[] = {+1,+0,-1,-2,-2,-2,+1,+0,-1,+2,+2,+2}; // frog
const int dy[] = {-2,-2,-2,+1,+0,-1,+2,+2,+2,+1,+0,-1}; // frog
const int ddx[] = {0,+0,-1,-1,-1,+0,+1,+1,+1};
const int ddy[] = {0,-1,-1,+0,+1,+1,+1,+0,-1};

int main(){

  while(true)
    {
      int n;
      vector<P> points;
      P phoy;

      cin >> phoy.F >> phoy.S;
      if(!(phoy.F|phoy.S))break;

      map<P,bool> used;

      cin >> n;

      rep(i,n)
	{
	  int xx,yy;
	  cin >> xx >> yy;
	  points.pb(P(xx,yy));
	}

      deque<P> deq;
      deq.push_front(phoy);

      bool fin = true;

      for(int i=0;i<=n;i++)
	{
	  int Size = deq.size();
	  map<P,bool> exist;

	  if(!Size)
	    {
	      cout << "NA" << endl;
	      fin = false;
	      break;
	    }

	  for(int j=0;j<9;j++)
	    {
	      int nx = points[i].F + ddx[j], ny = points[i].S + ddy[j];
	      exist[P(nx,ny)] = true;
	    }
	 
	  used.clear();
	  
	  for(int j=0;j<Size;j++)
	    {
	      P p = deq.front(); deq.pop_front();
		      
	      for(int k=0;k<12;k++)
		{
		  int nx = p.F + dx[k], ny = p.S + dy[k];
		  
		  if(exist[P(nx,ny)] && !used[P(nx,ny)])
		    {
		      used[P(nx,ny)] = true;
		      deq.push_back(P(nx,ny));
		    }

		}

	    }

	}



      if(fin)
	{
	  cout << "OK" << endl;
	}

    }
return 0;
}