#include<bits/stdc++.h>
#define mk make_pair
using namespace std;
int dx[]={2,2,2,1,1,0,0,-1,-1,-2,-2,-2};
int dy[]={1,0,-1,2,-2,2,-2,2,-2,1,0,-1};
int main(){
  int px,py;
  while(cin>>px>>py,px+py){
    int n,x,y;
    cin>>n;
    vector<pair<int,int> >v;
    v.push_back(mk(px,py));
    for(int o=0;o<n;o++){
      set<pair<int,int> >se;
      vector<pair<int,int> >t;
      cin>>x>>y;
      for(int i=0;i<v.size();i++){
        int sx=v[i].first,sy=v[i].second;
        for(int j=0;j<12;j++){
          int gx=dx[j]+sx,gy=dy[j]+sy;
          if(abs(gx-x)<=1&&abs(gy-y)<=1){
            if(se.count(mk(gx,gy)))continue;
            t.push_back(mk(gx,gy));
            se.insert(mk(gx,gy));
          }
        }
      }v=t;
    }
    if(v.size())cout<<"OK"<<endl;
    else cout<<"NO"<<endl;
  }
}