#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;

bool visited[10][10];
pii a[10];
int n;

pii t[12] = {{-2, 1}, {-2, 0}, {-2, -1}, {-1, -2}, {0, -2}, {1, -2}, {2, -1}, {2, 0}, {2, 1}, {1, 2}, {0, 2}, {-1, 2}};

struct node
{
    int x, y, d;
};

string dfs(node in)
{
    stack<node> st;
    st.push(in);

    while (!st.empty())
    {
        node u = st.top();
        bool flag = 0;

        rep(i, 12)
        {
            node nt;
            nt.x = u.x + t[i].first, nt.y = u.y + t[i].second;
            if (!(a[u.d].first - 1 <= nt.x && nt.x <= a[u.d].first + 1 && a[u.d].second - 1 <= nt.y && nt.y <= a[u.d].second + 1))
                continue;
            if (!visited[nt.x][nt.y])
            {
                nt.d = u.d + 1;
                if (nt.d == n)
                    return "OK";
                st.push(nt);
                flag = 1;
            }
        }

        if (!flag)
        {
            visited[u.x][u.y] = 1;
            st.pop();
        }
    }

    return "NA";
}

int main()
{
    node in;
    while (cin >> in.x >> in.y, in.x != 0 && in.y != 0)
    {
        rep(i, 10) rep(j, 10) visited[i][j] = 0;
        in.d = 0;
        cin >> n;

        rep(i, n) cin >> a[i].first >> a[i].second;

        OP(dfs(in));
    }

    return 0;
}
