#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <climits>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define ALL(A)		(A).begin(),(A).end()
#define DUMP(A)    cout<<#A<<"="<<(A)<< endl
#define SIZE(A)    (int)((A).size())
using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int main(){
    int vx[12]={0,1,2,2,2,1,0,-1,-2,-2,-2,-1};
    int vy[12]={2,2,1,0,-1,-2,-2,-2,-1,0,1,2};
    for(;;){
        int sx,sy;
        scanf("%d%d",&sx,&sy);
        if(sx==0&&sy==0) break;
        int n;
        scanf("%d",&n);
        int xs[10],ys[10];
        for(int i=0;i<n;i++){
            scanf("%d%d",&xs[i],&ys[i]);
        }
        queue<P> que;
        que.push(P(sx,sy));
        for(int i=0;i<n;i++){
            int sz=que.size();
            bool isre[10][10];
            for(int j=0;j<10;j++){
                for(int k=0;k<10;k++){
                    isre[j][k]=false;
                }
            }
            for(int j=0;j<sz;j++){
                P now=que.front();
                que.pop();
                int nx=now.first,ny=now.second;
                for(int v=0;v<12;v++){
                    int nex=nx+vx[v],ney=ny+vy[v];
                    if(0<=nex && nex<10 && 0<=ney && ney<10 && abs(nex-xs[i])<=1 && abs(ney-ys[i])<=1 && !isre[nex][ney]){
                        isre[nex][ney]=true;
                        que.push(P(nex,ney));
                    }
                }
            }
            if(i==n-1){
                if(que.empty()) printf("NA\n");
                else printf("OK\n");
            }
        }
    }
}