#include <algorithm>
#include <bitset>
#include <cstdio>
#include <cassert>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;

typedef long long LL;
typedef pair<int, int> P;
typedef pair<LL, LL> PLL;

bool solve() {
    constexpr int dx[12] = {2, 2, 1, 0, -1, -2, -2, -2, -1, 0, 1, 2};
    constexpr int dy[12] = {0, 1, 2, 2, 2, 1, 0, -1, -2, -2, -2, -1};

    int sx, sy;
    int N;
    int px[10], py[10];

    cin >> sx >> sy;
    if (sx == 0 && sy == 0) { 
        return false;
    }

    cin >> N;
    for (int j = 0; j < N; ++j) {
        cin >> px[j] >> py[j];
    }

    char alive[15][10][10];
    for (int j = 0; j <= N; ++j) {
        for (int k = 0; k < 10; ++k) {
            fill(alive[j][k], alive[j][k] + 10, 0);
        }
    }

    alive[0][sx][sy] = 1; // start position
    for (int j = 0; j < N; ++j) {
        for (int k = 0; k < 10; ++k) {
            for (int l = 0; l < 10; ++l) {
                if (alive[j][k][l] == 0) { continue; }
                int gx = px[j], gy = py[j];

                for (int m = 0; m < 12; ++m) {
                    int nx = k+dx[m], ny = l+dy[m];
                    if (nx < 0 || nx >= 10 || ny < 0 || ny >= 10) { continue; }
                    if (max(abs(gx-nx), abs(gy-ny)) <= 1) {
                        alive[j+1][nx][ny] = 1;
                    }
                }
            }
        }
    }

    for (int j = 0; j < 10; ++j) {
        for (int k = 0; k < 10; ++k) {
            if (alive[N][j][k] == 0) { continue; }
            if (max(abs(j-sx), abs(k-sy))) {
                cout << "OK" << endl;
                return true;
            }
        }
    }

    cout << "NA" << endl;
    return true;
}

int main() {
    while (solve());
    return 0;
}