#include <bits/stdc++.h>
using namespace std;
struct state{

  int step;
  int x;
  int y;

};

int n;
vector<pair<int, int> > v;
int sx, sy;
int xkeokeo[12] = {0, 1, -1, 0, -1, 1, 2, 2, 2, -2, -2, -2};
int ykeokeo[12] = {2, 2, 2, -2, -2, -2, 0, 1, -1, 0, 1, -1}; 
int xsprnc[9] = {0, 0, 1, 1, 1, -1, -1, -1, 0};
int ysprnc[9] = {1, -1, 0, 1, -1, 0, 1, -1, 0};
int d[11][11][11];
queue<state> quuu;
int x, y;
bool flag;



void wide(){

  quuu.push((state){0,x,y});
  d[0][x][y] = 1;

  while(!quuu.empty()){

    state st = quuu.front();
    quuu.pop();
    x = st.x;
    y = st.y;
    // cout << x << " " << y << " " << st.step <<endl;
    for(int i = 0; i < 12; i++){
      int nxk = x + xkeokeo[i], nyk = y + ykeokeo[i];
      for(int j = 0; j < 9; j++){
	int nsx = v[st.step].first + xsprnc[j], nsy = v[st.step].second + ysprnc[j];

	if(nxk == nsx && nyk == nsy && nxk >= 0 && nyk >= 0 && nxk < 10 && nyk < 10){
	  if(d[st.step+1][nxk][nyk] == 0){
	  quuu.push((state){st.step+1,nxk,nyk});
	  d[st.step+1][nxk][nyk] = 1;

	  }
	}

      }
    }


  }
  flag = false;  
  for(int i = 0; i < 11; i++){
    for(int j = 0; j < 11; j++){
      if(d[n][i][j] == 1){
	flag = true;
	  break;
      }
    }
    
  }
  if(flag == true) cout << "OK" << endl;
  else cout << "NA" << endl;

  v.clear();
  memset(d,0,sizeof(d));
}


int main(){

 
  while(cin >> x >> y && (x || y)){

    cin >> n;
    // v.push_back(make_pair(x, y));
    for(int i = 1; i <= n; i++){
      cin >> sx >> sy;
      v.push_back(make_pair(sx, sy));
    }

    wide();

  }


}