#include <iostream>
using namespace std;

struct Coodi{
	int x;
	int y;
};

int jumpPoint[][2] = {
	{ -1, -2 }, { 0, -2 }, { 1, -2 },
	{ 2, -1 }, { 2, 0 }, { 2, 1 },
	{ 1, 2 }, { 0, 2 }, { -1, 2 },
	{ -2, 1 }, { -2, 0 }, { -2, -1 },
};

bool jumpFrog( Coodi* frog, Coodi* spPos, int spQua, int spNumber )
{
	if( spNumber != -1 ){
		if( frog->x < spPos[ spNumber ].x - 1 || frog->x > spPos[ spNumber ].x + 1
			|| frog->y < spPos[ spNumber ].y - 1 || frog->y > spPos[ spNumber ].y + 1 ){
			return false;
		}
		if( spNumber == spQua - 1 ){
			return true;
		}
	}

	for( int i = 0; i < 12; ++i ){
		Coodi jumpedPos;
		jumpedPos.x = frog->x + jumpPoint[ i ][ 0 ];
		jumpedPos.y = frog->y + jumpPoint[ i ][ 1 ];
		if( jumpedPos.x < 0 || jumpedPos.x > 9
			|| jumpedPos.y < 0 || jumpedPos.y > 9 ){
			continue;
		}
		if( jumpFrog( &jumpedPos, spPos, spQua, spNumber + 1 ) ){
			return true;
		}
	}

	return false;
}

int main()
{
	Coodi frogPosition;

	while( cin >> frogPosition.x >> frogPosition.y ){
		if( frogPosition.x == 0 && frogPosition.y == 0 ){
			break;
		}

		int spQuantity;
		cin >> spQuantity;
		Coodi* spPosition = new Coodi[ spQuantity ];
		for( int i = 0; i < spQuantity; ++i ){
			cin >> spPosition[ i ].x >> spPosition[ i ].y;
		}

		if( jumpFrog( &frogPosition, spPosition, spQuantity, -1 ) ){
			cout << "OK" << endl;
		}else{
			cout << "NA" << endl;
		}
	}
	return 0;
}