#include <iostream>
#include <algorithm>
using namespace std;

const int MAXN = 11;

const int di[12] = {-1,0,1,2,2,2,1,0,-1,-2,-2,-2};
const int dj[12] = {2,2,2,1,0,-1,-2,-2,-2,-1,0,1};
const int H = 10;
const int W = 10;
int si, sj;
int n;
int ti[MAXN], tj[MAXN];

bool dfs(int step, int pi, int pj) {
  if(step == n) return true;
  for(int k = 0; k < 12; ++k) {
    int ni = pi + di[k];
    int nj = pj + dj[k];
    if(ni < 0 || ni >= H) continue;
    if(nj < 0 || nj >= W) continue;
    if(max(abs(ti[step]-ni),abs(tj[step]-nj)) >= 2) continue;
    if(dfs(step+1, ni, nj)) return true;
  }
  return false;
}

int main() {
  while(cin >> sj >> si && (si|sj)) {
    cin >> n;
    for(int i = 0; i < n; ++i) {
      cin >> tj[i] >> ti[i];
    }
    if(dfs(0, si, sj)) {
      cout << "OK" << endl;
    } else {
      cout << "NA" << endl;
    }
  }
  return 0;
}