#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>

using namespace std;

typedef pair<int, int>   Point;
typedef pair<int, Point> State;

int field[10][10];
int dx[] = {-2, -2, -2, -1, 0, 1, 2, 2,  2,  1,  0, -1};
int dy[] = {-1, -0,  1,  2, 2, 2, 1, 0, -1, -2, -2, -2};
vector<Point> waters;

bool in_field(int x, int y)
{
    return (x >= 0 && x < 10 && y >= 0 && y < 10);
}

bool check(int x, int y, int step) 
{
    if (in_field(x, y)) {
        int lx = abs(waters[step].first - x);
        int ly = abs(waters[step].second - y);
        return (lx <= 1 && ly <= 1);
    }
    return false;
}

int main()
{
    int sx, sy, w;
    while (cin >> sx >> sy && sx && sy) {
        cin >> w;
        waters.resize(w + 1);
        waters[0] = Point(sx, sy);
        for (int i = 0; i < w; i++) {
            int x, y;
            cin >> x >> y;
            waters[i + 1] = Point(x, y);
        }

        queue<State> que;
        que.push(State(0, Point(sx, sy)));
        bool goal = false;
        while (!que.empty()) {
            State s = que.front(); que.pop();
            int step = s.first;
            int x = s.second.first, y = s.second.second;
            if(!check(x, y, step)) {
                continue;
            }

            if(step == w) {
                goal = true;
                break;
            }

            for(int i = 0; i < 12; i++) {
                int nx = x + dx[i], ny = y + dy[i];
                que.push(State(step + 1, Point(nx, ny)));
            }
        }

        if (goal) {
            cout << "OK" << endl;
        } else {
            cout << "NA" << endl;
        }
    }
}