#include <bits/stdc++.h>

using namespace std;

struct Frog {
    int x, y, area;
};

struct Sprinkler {
    int x, y;
};

Sprinkler spr[10];
int graph[10][10];
int dx[] = {-1, 0, 1, 2, 2, 2, 1, 0, -1, -2, -2, -2};
int dy[] = {-2, -2, -2, -1, 0, 1, 2, 2, 2, 1, 0, -1};

void update(int area) {
    for(int i = spr[area].y - 1; i <= spr[area].y + 1; ++i) {
        for(int j = spr[area].x - 1; j <= spr[area].x + 1; ++j) {
            if(i >= 0 && i <= 9 && j >= 0 && j <= 9) {
                graph[i][j] = area;
            }
        }
    }
}

int main() {

    int x, y, n;

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

        cin >> n;

        for(int i = 0, spx, spy; i < n; ++i) {
            cin >> spr[i].x >> spr[i].y;
        }

        int alive = 0;
        queue<Frog> q;

        q.push((Frog){x, y, 0});
        memset(graph, -1, sizeof(graph));

        while(!q.empty()) {

            Frog now = q.front(); q.pop();

            if(now.area == n) {
                alive = 1;
                break;
            }

            update(now.area);

            for(int i = 0; i < 12; ++i) {
                Frog next = now;
                next.x += dx[i];
                next.y += dy[i];
                next.area++;
                if(next.x >= 0 && next.x <= 9 && next.y >= 0 && next.y <= 9) {
                    if(graph[next.y][next.x] == now.area) {
                        graph[next.y][next.x] = -1;
                        q.push(next);
                    }
                }
            }

        }

        cout << (alive ? "OK" : "NA") << endl;

    }

}