#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <queue>
#include <vector>
#include <cmath>
using namespace std;

typedef pair<int, int> P;
typedef pair<P, int> P2;

const int dx[] = {-1, 0, 1, 2, 2, 2, 1, 0, -1, -2, -2, -2};
const int dy[] = {2, 2, 2, 1, 0, -1, -2, -2, -2, 1, 0, -1};

int sx, sy, n;

bool bfs(vector<P> cooler){
  queue<P2> que;
  que.push(P2(P(sx, sy), 0));

  while(!que.empty()){
    int x = que.front().first.first;
    int y = que.front().first.second;
    int c = que.front().second;
    que.pop();

    if(c == n) return true;
    for(int i = 0 ; i < 12 ; i++){
      int nx = x+dx[i], ny = y+dy[i];
      if(0 <= nx && nx <= 9 && 0 <= ny && ny <= 9 &&
	 abs(nx-cooler[c].first) <= 1 && abs(ny-cooler[c].second) <= 1){
	que.push(P2(P(nx, ny), c+1));
      }
    }
  }
  return false;
}

int main(){
  while(cin >> sx >> sy){
    if(sx == 0 && sy == 0) break;
    cin >> n;
    vector<P> cooler(n);
    for(int i = 0 ; i < n ; i++){
      cin >> cooler[i].first >> cooler[i].second;
    }
    
    if(bfs(cooler)) cout << "OK" << endl;
    else cout << "NA" << endl;
  }
  return 0;
}