#include<algorithm>
#include<iostream>
#include<queue>
#include<tuple>
#include<vector>

typedef std::tuple<int, int, int> T;

const int dx[12] = { -1, 0, 1, 2, 2, 2, 1, 0, -1, -2, -2, -2 },
		  dy[12] = { -2, -2, -2, -1, 0, 1, 2, 2, 2, 1, 0, -1 };

int x, y;
int n;
int sx[10], sy[10];
std::vector<int> field[10][10];

bool safe( int x, int y )
{
	return x >= 0 && x < 10 && y >= 0 && y < 10;
}

bool bfs()
{
	std::queue<T> que;
	que.push( T( 0, x, y ) );

	while( !que.empty() )
	{
		T t = que.front(); que.pop();
		int cnt = std::get<0>( t );
		int fx = std::get<1>( t ), fy = std::get<2>( t );

		if( cnt == n )
			return true;

		for( int i = 0; i != 12; ++i )
		{
			int nx = fx + dx[i], ny = fy + dy[i];

			if( !safe( nx, ny ) )
				continue;

			if( std::find( field[nx][ny].begin(), field[nx][ny].end(), cnt + 1 ) == field[nx][ny].end() )
				continue;

			que.push( T( cnt + 1, nx, ny ) );
		}
	}

	return false;
}

int main()
{
	while( std::cin >> x >> y, x | y )
	{
		for( int i = 0; i != 10; ++i )
			for( int j = 0; j != 10; ++j )
				field[i][j].clear();

		std::cin >> n;
		for( int i = 0; i != n; ++i )
		{
			int sx, sy;
			std::cin >> sx >> sy;

			for( int j = -1; j <= 1; ++j )
				for( int k = -1; k <= 1; ++k )
					if( safe( sx + j, sy + k ) )
						field[sx+j][sy+k].push_back( i + 1 );
		}

		if( bfs() )
			std::cout << "OK" << std::endl;
		else
			std::cout << "NA" << std::endl;
	}

	return 0;
}