#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <queue>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
const int INF = 1<<30;
int n;
int sx[10];
int sy[10];

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

const int dx2[9] = {-1,-1,-1,0,0,0,1,1,1};
const int dy2[9] = {-1,0,1,-1,0,1,-1,0,1};

bool solve(int x, int y, int m) {
  if (m == n) return true;
  // REP(i,m)
  //   cout << " ";
  // cout << x << ", " << y << endl;
  
  REP(i,12) {
    int xx = x + dx[i];
    int yy = y + dy[i];

    bool f = false;
    REP(j,9) {
      int sxx = sx[m] + dx2[j];
      int syy = sy[m] + dy2[j];

      if (xx == sxx && yy == syy) {
        f = true;
        break;
      }
    }
    if (f && solve(xx, yy, m+1))
        return true;
  }
  return false;
}

int main() {
  int x, y;
  while(cin >> x >> y, x||y) {
    cin >> n;
    REP(i,n) {
      cin >> sx[i] >> sy[i];
    }
    if (solve(x,y,0)) 
      cout<< "OK" << endl;
    else
      cout << "NA" << endl; 
  }
}