#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;

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

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

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int px, py;
    while(cin >> px >> py){
        if(px == 0 and py == 0) return 0;
        
        int n;
        cin >> n;
        vector<P> A(n);
        
        for(int i = 0; i < n * 2; i++){
            if(i % 2 == 0) cin >> A[i / 2].first;
            else cin >> A[i / 2].second;
        }

        bool f = false;
        queue<pair<P, int>> q; // {{now}, now_idx}
        q.push({{px, py}, 0});
        while(!q.empty()){
            pair<P, int> t = q.front();
            q.pop();
            int nx, ny, ni;
            nx = t.first.first;
            ny = t.first.second;
            ni = t.second;
            if(ni == n){f = true; break;}

            int gx, gy;
            gx = A[ni].first;
            gy = A[ni].second;
            for(int i = 0; i < 12; i++){
                int ax, ay;
                ax = dx[i] + nx;
                ay = dy[i] + ny;
                if(ax < 0 or ay < 0 or ax > 10 or ay > 10) continue;
                for(int j = 0; j < 9; j++){
                    int gdx, gdy;
                    gdx = gx + dx2[j];
                    gdy = gy + dy2[j];
                    if(ax == gdx and ay == gdy){
                        q.push({{ax, ay}, ni + 1});
                    }
                }
            }
        }
        cout << (f ? "OK" : "NA") << endl;
    }

    return 0;
}
