#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<queue>
using namespace std;
struct P {
  int y;
  int x;
  int c;
  P(){}P(int y,int x,int c):y(y),x(x),c(c){}
};
int n;
int f_dy[]={2,2,2,-2,-2,-2,0,1,-1,0,1,-1};
int f_dx[]={0,1,-1,0,1,-1,2,2,2,-2,-2,-2};
int dy[]={0,0,0,1,-1,-1,-1,1,1};
int dx[]={0,1,-1,0,0,-1,1,-1,1};
int d[11][11][11]; // 座標,何個目か
int dfs(int sy,int sx,int v);
int main(){
  int sy,sx;
  int a,b;
  while(1){
    cin >> sy >> sx;
    if(!sy && !sx)break;
    cin >> n;
    for(int i=0;i<n;i++){
      cin >> a >> b;
      for(int j=0;j<9;j++){
      d[a+dy[j]][b+dx[j]][i] = 1;
      }
    }
    int ret = dfs( sy , sx , 0 );
    if(ret == 1){
      cout << "OK" << endl;
    }else {
      cout << "NA" << endl;
    }
  }
}
int dfs(int sy,int sx,int v){

  queue<P> que;
  que.push(P(sy,sx,v));
  
  while(!que.empty()){
    P p = que.front();que.pop();
    if(p.c == n-1)return 1;


    for(int i=0;i<12;i++){
      int ty = p.y + f_dy[i];
      int tx = p.x + f_dx[i];
      if(d[ty][tx][p.c+1] == 1){
        que.push(P(ty,tx,p.c+1));
        d[ty][tx][p.c+1] = 0;
      }
    }
  }
  return -1;
}