#include<iostream>
#include<cstdlib>
#include<map>
#include<cstring>
#include<queue>
using namespace std;

#define REP(i,a,b) for(i=a; i<b; ++i)
#define rep(i,n) REP(i,0,n)

const int w=10,h=10;
int ix,iy,i,j,k,n;
pair<int,int> splink[10];
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};


struct state{
  int x,y,t;
  state(int x,int y,int t) : x(x), y(y), t(t) {;}
  state() {;}
    };

bool ok(int x,int y,int t) {
  if(x < 0 || x >= 10 || y < 0 || y > 9) return false;
  if(abs(splink[t].first-x) <= 1 && abs(splink[t].second-y) <= 1) return true;
  return false;
}
bool bfs(int x,int y) {
  state now(x,y,0);
  queue<state> Q;
  Q.push(now);
  while(!Q.empty()) {
    now = Q.front(); Q.pop();
    if(now.t == n) return true;
    rep(j,12) {
      int ddx = now.x+dx[j],ddy = now.y+dy[j];
      if(ok(ddx,ddy,now.t)) {
	Q.push(state(ddx,ddy,now.t+1));
      }
    }
  }
  return false;
}

int main() {
  while(cin>>ix>>iy, ix|iy) {
    cin>>n;
    rep(i,n) {
      cin>>j>>k;
      splink[i] = make_pair(j,k);
    }
    if(bfs(ix,iy)) cout<<"OK"<<endl;
    else cout<<"NA"<<endl;
  }
}