#include <bits/stdc++.h>

using namespace std;

typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n)  FOR(i,0,n)
#define INF 1e9

int main(){
    while(true){
        int sx,sy;
        bool flag = false;
        cin >> sx >> sy ;
        if(sx == 0 && sy == 0)
            break;
        int n;
        cin >> n ;
        vector<pair<int,int> > sprinkleres(n);
        FOR(i,0,n){
            int x,y;
            cin >> x >> y ;
            sprinkleres[i] = make_pair(x,y);
        }

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

        vector<pair<pair<int,int>,int> > queue;
        queue.push_back(make_pair(make_pair(sx,sy),0));

        while(queue.size() != 0){
            auto pair = queue.begin();queue.erase(queue.begin());
            auto point = pair->first;
            auto next_sprinker = pair->second;

            for(int j=0;j<12;j++){
                int nx = point.first + dx[j];
                int ny = point.second + dy[j];
                
                if(abs(sprinkleres[next_sprinker].first - nx) <= 1 && abs(sprinkleres[next_sprinker].second - ny) <= 1){
                    if(next_sprinker == n - 1){
                        flag = true;
                        break;
                    }
                    queue.push_back(make_pair(make_pair(nx,ny),next_sprinker+1));
                }
            }
            if(flag)
                break;
        }
        if(flag){
            printf("OK\n");
         }else{
             printf("NA\n");
         }
    }

    return 0;
}