#include<iostream>
#include<vector>

using namespace std;

const int MAX = 11;
typedef pair<int,int> P;
int pyon_x[] = {-2,-2,-2,-1,-1,0,0,1,1,2,2,2};
int pyon_y[] = {1,0,-1,2,-2,2,-2,2,-2,1,0,-1};
int sp_x[] = {-1,-1,-1,0,0,0,1,1,1};
int sp_y[] = {1,0,-1,1,0,-1,1,0,-1};

bool able[MAX];
P pos[MAX];
int n;

void init(){
  fill(able,able+MAX,false);
}

bool save(int x, int y, int num){
  for(int i = 0; i < 9; i++)
    if(pos[num].first + sp_x[i] == x && 
       pos[num].second + sp_y[i] == y) return true;

  return false;
}

void solve(int x,int y, int num){
  if(num < n)
  for(int i = 0; i < 12; i++){
    if(0 <= x + pyon_x[i] && x + pyon_x[i] <= 9 &&
       0<= y+pyon_y[i] && y+pyon_y[i] <= 9){
      if(save(x+pyon_x[i],y+pyon_y[i],num+1)){
	able[num+1] = true;
	solve(x+pyon_x[i],y+pyon_y[i],num+1);
      }
    }
  }
}

string ans(){
  for(int i = 1; i <= n; i++)
    if(!able[i]) return "NA";

  return "OK";
}
int main(){
  int x,y;
  while(cin >> x >> y && x+y){
    init();
    cin >> n;

    for(int i = 1; i <= n; i++){
      P p;
      cin >> p.first >> p.second;
      pos[i] = p;
    }
    solve(x,y,0);
    cout << ans() << endl;
  }
  return 0;
}