#include <iostream>
using namespace std;


int park[11][10][10] = {{0}};
int x, y, n;

bool can_move(int x, int y){
    return (0 <= x && x <= 9) && (0 <= y && y <= 9);
}

bool solve(int x, int y, int this_sprinkler){
    if (!can_move(x, y)) return false;
    if (park[this_sprinkler][x][y] != this_sprinkler) return false;
    if (park[this_sprinkler][x][y] == n){
        return true;
/*            (can_move(x-1, y-2) && !park[1][x-1][y-2]
             or
             can_move(x, y-2)   && !park[1][x][y-2]
             or 
             can_move(x+1, y-2) && !park[1][x+1][y-2]
             or
             can_move(x-2, y+1) && !park[1][x-2][y+1]
             or
             can_move(x+2, y+1) && !park[1][x+2][y+1]
             or
             can_move(x-2, y)   && !park[1][x-2][y]
             or
             can_move(x+2, y)   && !park[1][x+2][y]
             or
             can_move(x-2, y+1) && !park[1][x-2][y+1]
             or
             can_move(x+2, y+1) && !park[1][x+2][y+1]
             or
             can_move(x-1, y+2) && !park[1][x-1][y+2]
             or
             can_move(x, y+2)   && !park[1][x][y+2]
             or
             can_move(x+1, y+2) && !park[1][x+1][y+2]);
             */
    }
    return
        (solve(x-1, y-2, this_sprinkler+1)
         or
         solve(x,y-2, this_sprinkler+1)
         or
         solve(x+1, y-2, this_sprinkler+1)
         or
         solve(x-2, y+1, this_sprinkler+1)
         or
         solve(x+2, y+1, this_sprinkler+1)
         or
         solve(x-2, y, this_sprinkler+1)
         or
         solve(x+2, y, this_sprinkler+1)
         or
         solve(x-2, y+1, this_sprinkler+1)
         or
         solve(x+2, y+1, this_sprinkler+1)
         or
         solve(x-1, y+2, this_sprinkler+1)
         or
         solve(x, y+2, this_sprinkler+1)
         or
         solve(x+1, y+2, this_sprinkler+1));
}

int main(){
    while (1){
        cin >> x >> y;
        if (x == 0 && y == 0) break;
        cin >> n;
        int n_ = n;
        for (int i = 0; i < 11; i++)
            for (int j = 0; j < 10; j++)
                for (int k = 0; k < 10; k++)
                    park[i][j][k] = -1;
        park[0][x][y] = 0;
        int x_, y_;
        while (n_--){
            cin >> x_ >> y_;
            for (int i = -1; i <= 1; i++)
                for (int j = -1; j <= 1; j++)
                    if (can_move(x_+i, y_+j))
                        park[n - n_][x_+i][y_+j] = n - n_;
        }

        bool result = solve(x, y, 0);
        if (result) cout << "OK" << endl;
        else cout << "NA" << endl;
    }
}