#include <stdio.h>
#include<math.h>
#include <algorithm>
using namespace std;

int n;
bool isAlive = false;

struct WaterServer{
	int x,y;
};

bool rangeCheck(int col,int row){
	if(col >=0 && col <= 9 && row >=0 && row <= 9)return true;
	else{
		return false;
	}
}

bool isInZone(int col,int row,int count,WaterServer server[10]){
	int x = server[count].x,y = server[count].y;

	if(rangeCheck(x,y) == true && x == col && y == row)return true;
	if(rangeCheck(x-1,y-1) == true && x-1 == col && y-1 == row)return true;
	if(rangeCheck(x,y-1) == true && x == col && y-1 == row)return true;
	if(rangeCheck(x+1,y-1) == true && x+1 == col && y-1 == row)return true;
	if(rangeCheck(x-1,y) == true && x-1 == col && y == row)return true;
	if(rangeCheck(x+1,y) == true && x+1 == col && y == row)return true;
	if(rangeCheck(x-1,y+1) == true && x-1 == col && y+1 == row)return true;
	if(rangeCheck(x,y+1) == true && x == col && y+1 == row)return true;
	if(rangeCheck(x+1,y+1) == true && x+1 == col && y+1 == row)return true;

	return false;
}

void recursive(int col,int row,int count,WaterServer server[10]){
	if(count == n){
		isAlive = true;
		return;
	}
	if(rangeCheck(col-1,row-2) == true && isInZone(col-1,row-2,count,server) == true)recursive(col-1,row-2,count+1,server);
	if(rangeCheck(col,row-2) == true && isInZone(col,row-2,count,server) == true)recursive(col,row-2,count+1,server);
	if(rangeCheck(col+1,row-2) == true && isInZone(col+1,row-2,count,server) == true)recursive(col+1,row-2,count+1,server);
	if(rangeCheck(col-2,row-1) == true && isInZone(col-2,row-1,count,server) == true)recursive(col-2,row-1,count+1,server);
	if(rangeCheck(col+2,row-1) == true && isInZone(col+2,row-1,count,server) == true)recursive(col+2,row-1,count+1,server);
	if(rangeCheck(col-2,row) == true && isInZone(col-2,row,count,server) == true)recursive(col-2,row,count+1,server);
	if(rangeCheck(col+2,row) == true && isInZone(col+2,row,count,server) == true)recursive(col+2,row,count+1,server);
	if(rangeCheck(col-2,row+1) == true && isInZone(col-2,row+1,count,server) == true)recursive(col-2,row+1,count+1,server);
	if(rangeCheck(col+2,row+1) == true && isInZone(col+2,row+1,count,server) == true)recursive(col+2,row+1,count+1,server);
	if(rangeCheck(col-1,row+2) == true && isInZone(col-1,row+2,count,server) == true)recursive(col-1,row+2,count+1,server);
	if(rangeCheck(col,row+2) == true && isInZone(col,row+2,count,server) == true)recursive(col,row+2,count+1,server);
	if(rangeCheck(col+1,row+2) == true && isInZone(col+1,row+2,count,server) == true)recursive(col+1,row+2,count+1,server);
}

int main(){

	int col,row,table[10][10];
	WaterServer server[10];

	while(true){
		scanf("%d %d",&col,&row);
		if(col == 0 && row == 0)break;

		for(int i=0; i < 10; i++){
			for(int k=0; k < 10; k++)table[i][k] = 0;
		}

		scanf("%d",&n);

		for(int i=0; i < n; i++){
			scanf("%d %d",&server[i].x,&server[i].y);
		}

		recursive(col,row,0,server);

		if(isAlive)printf("OK\n");
		else{
			printf("NA\n");
		}

		isAlive = false;
	}

    return 0;
}