#include <iostream>
#include <cstring>
#include <queue>
#include <map>
#define fr first
#define sc second
using namespace std;

typedef pair<int, int> iP;
typedef pair<iP, int> iiP;

int n;
bool used[10][10];
iP s[10];
int pdx[] = {-2, -2, -2, 1, 1, 0, 0, -1, -1, 2, 2, 2}, pdy[] = {1, 0, -1, 2, -2, 2, -2, 2, -2, 1, 0, -1};
int sdx[] = {-1, -1, -1, 0, 0, 0, 1, 1, 1}, sdy[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};

bool check(int x, int y, int i){
  
  for(int j = 0; j < 9; j++){
    int nx = s[i].fr + sdx[j], ny = s[i].sc + sdy[j];
    if(x == nx && y == ny) return true;
  }
  return false;

}

bool bfs(int sx, int sy){
  
  memset(used, false, sizeof(used));
  queue <iiP> que;
  que.push(iiP(iP(sx, sy), 0));
  while(!que.empty()){
    iiP p = que.front(); que.pop();
    int x = p.fr.fr, y = p.fr.sc;
    if(p.sc == n) return true;
    for(int i = 0; i < 12; i++){
      int nx = x + pdx[i], ny = y + pdy[i];
      if(nx < 0 || nx > 9 || ny < 0 || ny > 9 || used[ny][nx]) continue;
      if(check(nx, ny, p.sc)){
	que.push(iiP(iP(nx, ny), p.sc + 1));
	used[ny][nx] = true;
      }
    }
  }
  return false;

}
    
  
int main(){
  
  int sx, sy;
  while(cin >> sx >> sy, sx||sy){
    cin >> n;
    for(int i = 0; i < n; i++) cin >> s[i].fr >> s[i].sc;
    
    cout << (bfs(sx, sy) ? "OK" : "NA") << endl;
  }

}