#include<iostream>
#include<queue>
using namespace std;
int dy[]={-2,-2,-2,-1,0,1,2,2,2,-1,0,1};
int dx[]={-1,0,1,-2,-2,-2,-1,0,1,2,2,2};
struct phyon{
    int y,x,cnt;
    phyon(int y_,int x_,int cnt_){
        y=y_;x=x_;cnt=cnt_;
    }
};
int zec(int n){
    if(n<0)n*=-1;
    return n;
}
int main(){
    int sy,sx,n;
    pair<int,int>spr[10];
    while(cin>>sx>>sy&&(sy||sx)){
        cin>>n;
        for(int i=0;i<n;i++)cin>>spr[i].second>>spr[i].first;
        phyon start(sy,sx,-1);
        queue<phyon>Q;
        Q.push(start);
        bool flag=false;
        while(!Q.empty()){
            phyon a=Q.front();
            Q.pop();
            if(a.y<0||a.y>=10||a.x<0||a.x>=10)continue;
            if(a.cnt==n-1){
                flag=true;
                break;
            }
            for(int i=0;i<12;i++){
                int py = a.y+dy[i],px = a.x+dx[i];
                if(py<0 || 9<py || px<0 || 9<px) continue;
                if(zec(py-spr[a.cnt+1].first)>=2)continue;
                if(zec(px-spr[a.cnt+1].second)>=2)continue;
                phyon next(a.y+dy[i],a.x+dx[i],a.cnt+1);
                Q.push(next);

            }
        }
        if(flag)cout<<"OK"<<endl;
        else cout<<"NA"<<endl;
    }
    return 0;
}