#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <cstring>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
static const double EPS = 1e-5;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
int sx,sy;
int n;
int kx[10],ky[10];
const int dx[12] = {2,2,2,1,0,-1,-2,-2,-2,-1,0,1};
const int dy[12] = {1,0,-1,-2,-2,-2,-1,0,1,2,2,2};
bool in(int x,int y){
  if(x<0||x>9) return false;
  if(y<0||y>9) return false;
  return true;
}
bool skr(int i,int x, int y){
  if(abs(x-kx[i])>1) return false;
  if(abs(y-ky[i])>1) return false;
  return true;
}
bool dfs(int i,int x,int y){
  if(i==n) return true;
  REP(j,12){
    int nx = x + dx[j];
    int ny = y + dy[j];
    if(!in(nx,ny)) continue;
    if(!skr(i,nx,ny)) continue;
    if(dfs(i+1,nx,ny)) return true;
  }
  return false;
}
int main(void){
  while(cin>>sx>>sy){
    if(sx==0&&sy==0) break;
    cin>>n;
    REP(i,n){
      cin>>kx[i]>>ky[i];
    }
    if(dfs(0,sx,sy))cout<<"OK"<<endl;
    else cout<<"NA"<<endl; 
  }
  return 0;
}