#include <cstdio>
#include <cstdlib>
#include <csetjmp>
#include <queue>

#define N 10
#define ABS(X) \
  ( (X) < 0 ? -(X) : (X) )

using namespace std;

typedef struct arw
{
  int no;
  int x;
  int y;

  arw (
    int x,
    int y,
    int no = 0
    )
  {
    this->x = x;
    this->y = y;
    this->no = no;

    return ;
  }
} arw;

static const int vx[ 12 ]
  = { -1,  0,  1, -1,  0,  1, -2, -2, -2,  2,  2,  2 };
static const int vy[ 12 ]
  = { -2, -2, -2,  2,  2,  2, -1,  0,  1, -1,  0,  1 };

int
main (
  int   argc,
  char *argv[ ]
  )
{
  int i, j;

  for ( ; ; )
  {
    queue<arw> lis;
    jmp_buf cont;
    int dx[ N ], dy[ N ];
    int x, y, n;

    scanf ( "%d%d", &x, &y );
    if ( x == 0 && y == 0 ) break ;
    scanf ( "%d", &n );
    for ( i = 0; i < n; ++i )
    {
      scanf ( "%d%d", &dx[ i ], &dy[ i ] );
    }

    lis.push ( arw ( x, y ) );
    if ( setjmp ( cont ) == 0 )
    {
      while ( !lis.empty ( ) )
      {
        const arw c = lis.front ( );
        lis.pop ( );

        if ( c.no == n )
        {
          puts ( "OK" );
          longjmp ( cont, 0 );
        }

        for ( i = 0; i < 12; ++i )
        {
          const int nx = c.x + vx[ i ];
          const int ny = c.y + vy[ i ];

          if ( nx < 0 || nx >= 10 || ny < 0 || ny >= 10 )
            continue ;

          if ( ABS( dx[ c.no ] - nx ) <= 1
            && ABS( dy[ c.no ] - ny ) <= 1 )
          {
            lis.push ( arw ( nx, ny, c.no + 1 ) );
          }
        }
      }
      puts ( "NA" );
    }
  }

  return ( EXIT_SUCCESS );
}