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

using namespace std;
typedef pair<int, int> crd;
typedef pair<crd, int> live;

int mx[] = {-1, 0, 1, 2, 2, 2, 1, 0, -1, -2, -2, -2};
int my[] = {2, 2, 2, 1, 0, -1, -2, -2, -2, -1, 0, 1};

vector<string> f(10);

int main() {
    int fx, fy, n;

    while( cin >> fx >> fy , fx && fy ) {
        cin >> n;

        // cout << "fx:" << fx << " fy:" << fy << " n:" << n << endl;

        int cnt = 0;

        vector<crd> sprinc;
        queue<live> life;

        // 入力
        for ( int i = 0; i < n; i++ ) {
            int x, y;
            cin >> x >> y;
            sprinc.push_back( make_pair(x, y) );
        }

        // 初期位置をpush
        crd a = make_pair(fx, fy);
        life.push( make_pair(a , 0) );

        int flg = 0;
        while(!life.empty()) {
            live tmp = life.front();
            int x = tmp.first.first,
                y = tmp.first.second,
                z = tmp.second;
            life.pop();

            if ( z == n ) {
                flg = 1;
                break;
            }

            for ( int j = 0; j < 12; j++ ) {
                int nx = x + mx[j],
                    ny = y + my[j];

                if ( !(0 <= nx && nx < 10 && 0 <= ny && ny < 10) ) continue;

                if ( abs(nx-sprinc[z].first) <= 1 && abs(ny-sprinc[z].second) <= 1 ) {
                    life.push( make_pair( make_pair(nx, ny), z+1 ) );
                }
            }
        }

        if ( flg ) {
            cout << "OK";
        } else {
            cout << "NA";
        }
        cout << endl;
    }
    return 0;
}