#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<cstring>
#include<queue>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)

const int MAXH = 11, MAXW = 11, MAXN = 11;

bool w[MAXN][MAXH][MAXW];
bool check[MAXN][MAXH][MAXW];
int dx[] = {0,1,2,2,2,1,0,-1,-2,-2,-2,-1};
int dy[] = {-2,-2,-1,0,1,2,2,2,1,0,-1,-2};

bool ok ;
int sx, sy, n;

int main()
{
    while(cin >> sx >> sy &&( sx || sy))
    {
        memset(w, false, sizeof(w));
        cin >> n;
        int spx, spy;
        REP(n)
        {
            cin >> spx >> spy;
            rep(y,3)rep(x,3)if(spx + x - 1 > 0 && spx + x - 1 < MAXW && spy + y -1 > 0 && spy + y -1 < MAXH)
                w[i][spx + x - 1][spy + y - 1] = true;
        }       

        ok = false;
        memset(check, false, sizeof(check));
        check[0][sx][sy] = true;

        rep(t,n)rep(y,MAXH)rep(x, MAXW)if(check[t][x][y])
        {
            rep(j,12)rep(i,12)if(x+dx[i]> 0 && x+dx[i] < MAXW && y+dy[j] > 0 && y + dy[j] < MAXH)
                if(w[t][x+dx[i]][y+dy[j]])
                {
                    //cout << "t:" <<t << " x:" << x+dx[i] << " y:" << y+dy[j] << endl;
                    check[t+1][x+dx[i]][y+dy[j]] = true;
                }
        }
        rep(y, MAXH)rep(x,MAXW)if(check[n][x][y]) ok = true;

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

    return 0;
}