#define INF 999999
#include<iostream>
#include<queue>
#include<cstdio>
using namespace std;
typedef pair<int, int> P;
int mas[10][10],mass[10][10];
int d[100][100];
int dx[] ={0,0,1,1,-1,-1,2,2,2,-2,-2,-2},dy[] = {2,-2,2,-2,2,-2,0,1,-1,0,1,-1};
int n,sx,sy,kx[10],ky[10];
int cnt = 0,cnt2 = 0;
bool f = 0;
int bfs();
int main(){
  while(1){
    cin >> sx >> sy;
    if(sx == 0 && sy == 0)break;
    cin >> n;
    for(int i = 0; i < n; i++){
      cin >> kx[i] >> ky[i];
      mas[ky[i]][kx[i]] = i + 1;
    }
    int ans = bfs();
    if(ans == 1) cout << "OK" << endl;
    else cout << "NA" << endl;
  }
}
int bfs(){
  for(int i = 0; i < 10; i++){
    for(int j = 0; j < 10; j++){
      d[i][j] = INF;
    }
  }
  queue <P> que;
  que.push(P(sx,sy));
  d[sy][sx] = 0;
  while(!que.empty()){
    if(cnt == 1)cnt2++;
    cnt = 0;
    P p = que.front();
    que.pop();
    if(cnt2 == n){
      return 1;  
    }
    for(int i = 0; i < 12; i++){
      int nx = p.first + dx[i];
      int ny = p.second + dy[i];
      if(nx >= 0 && ny >= 0 && nx <= 9 && ny <= 9 && nx >= kx[cnt2] - 1 && nx <= kx[cnt2] + 1 && ny >= ky[cnt2] - 1 && ny <= ky[cnt2] + 1 && d[ny][nx] == INF){
	que.push(P(nx,ny));
	d[ny][nx] = 1;
	cnt = 1;
      }
    }
  }
  return -1;
}