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

using namespace std;
typedef pair<int, int> P;
typedef pair<int, P> S;

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

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

int main()
{
    int sx, sy, n;
    int field[10][10];
    while(cin >> sx >> sy && sx && sy) {
        cin >> n;
        vector<P> v(n);
        memset(field, 0,  10 * 10);
        for(int k = 0; k < n; k++) {
            int x, y;
            cin >> x >> y;
            for(int i = -1; i <= 1; i++) 
                for(int j = -1; j <= 1; j++) 
                    if(check(x + j, y + i)) 
                        field[y + i][x + j] += 1 << k;
                       
            
        }
                       
        queue<S> que;
        que.push(S(0, P(sx, sy)));
        bool ok = false;
        while(!que.empty()) {
            S s = que.front(); que.pop();
            P p = s.second;
            int c = s.first, x = p.first, y = p.second;
            if(c == n - 1) {
                ok = true;
                break;
            }
            for(int i = 0; i < 12; i++) {
                int xx = x + dx[i], yy = y + dy[i];
                if(!check(xx, yy)) continue;
                if(field[yy][xx] & c == c) que.push(S(c + 1, P(xx, yy)));
            }
        }
        cout << ((ok) ? "OK" : "NA") << endl;
    }
}