Language: C++

import std.stdio;
import std.algorithm;
import std.string;
import std.range;
import std.array;
import std.conv;
import std.complex;
import std.math;
import std.ascii;
import std.bigint;
import std.container;

bool next(bool[][] m, int x, int y){
	auto s = new bool[][](10+4, 10+4);
	foreach(i; -1..2){
		foreach(j; -1..2){
			s[x+i][y+j] = true;
		}
	}
	foreach(i; 0..10+4){
		s[i][0] = false;
		s[i][1] = false;
		s[i][12] = false;
		s[i][13] = false;
		s[0][i] = false;
		s[1][i] = false;
		s[12][i] = false;
		s[13][i] = false;
	}
	auto t = new bool[][](14,14);
	foreach(i; 2..12) {
		foreach(j; 2..12) {
			if(m[i][j]){
				t[i+2][j-1] = true;
				t[i+2][j] = true;
				t[i+2][j+1] = true;
				t[i-2][j-1] = true;
				t[i-2][j] = true;
				t[i-2][j+1] = true;
				t[i-1][j+2] = true;
				t[i][j+2] = true;
				t[i+1][j+2] = true;
				t[i-1][j-2] = true;
				t[i][j-2] = true;
				t[i+1][j-2] = true;
			}
		}
	}
	bool ret;
	foreach(i; 2..12) {
		foreach(j; 2..12) {
			m[i][j] = t[i][j] && s[i][j];
			ret |= m[i][j];
		}
	}
	return ret;
}

void main() {
	auto xy = map!(to!int)(readln().strip().split());
	while(xy[0]|xy[1]){
		auto m = new bool[][](10+4,10+4);
		m[xy[0]+2][xy[1]+2] = true;
		int n = to!int(readln().strip());
		auto s = map!(to!int)(readln().strip().split());
		bool f = true;
		foreach(i; 0..n){
			f &= next(m, s[i*2]+2, s[i*2+1]+2);
		}
		writeln(f?"OK":"NA");
		xy = map!(to!int)(readln().strip().split());
	}
}

Compiler output:
a.cc:15:21: error: too many decimal points in number
   15 |         foreach(i; -1..2){
      |                     ^~~~
a.cc:16:29: error: too many decimal points in number
   16 |                 foreach(j; -1..2){
      |                             ^~~~
a.cc:20:20: error: too many decimal points in number
   20 |         foreach(i; 0..10+4){
      |                    ^~~~~
a.cc:31:20: error: too many decimal points in number
   31 |         foreach(i; 2..12) {
      |                    ^~~~~
a.cc:32:28: error: too many decimal points in number
   32 |                 foreach(j; 2..12) {
      |                            ^~~~~
a.cc:50:20: error: too many decimal points in number
   50 |         foreach(i; 2..12) {
      |                    ^~~~~
a.cc:51:28: error: too many decimal points in number
   51 |                 foreach(j; 2..12) {
      |                            ^~~~~
a.cc:67:28: error: too many decimal points in number
   67 |                 foreach(i; 0..n){
      |                            ^~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import std.algorithm;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import std.string;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import std.range;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import std.array;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import std.conv;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import std.complex;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
    8 | import std.math;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: 'import' does not name a type
    9 | import std.ascii;
      | ^~~~~~
a.cc:9:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1: error: 'import' does not name a type
   10 | import std.bigint;
      | ^~~~~~
a.cc:10:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:11:1: error: 'import' does not name a type
   11 | import std.container;
      | ^~~~~~
a.cc:11:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:13:18: error: multidimensional array must have bounds for all dimensions except the first
   13 | bool next(bool[][] m, int x, int y){
      |                  ^
a.cc:13:20: error: expected ',' or '...' before 'm'
   13 | bool next(bool[][] m, int x, int y){
      |                    ^
a.cc: In function 'bool next(...)':
a.cc:14:29: error: expected primary-expression before ']' token
   14 |         auto s = new bool[][](10+4, 10+4);
      |                             ^
a.cc:15:17: error: 'i' was not declared in this scope
   15 |         foreach(i; -1..2){
      |                 ^
a.cc:20:18: error: expected ')' before ';' token
   20 |         foreach(i; 0..10+4){
      |                ~ ^
      |                  )
a.cc:30:29: error: expected primary-expression before ']' token
   30 |         auto t = new bool[][](14,14);
      |                             ^
a.cc:31:18: error: expected ')' before ';' token
   31 |         foreach(i; 2..12) {
      |                ~ ^
      |                  )
a.cc:50:18: error: expected ')' before ';' token
   50 |         foreach(i; 2..12) {
      |                ~ ^
      |                  )
a.cc: At global scope:
a.cc:59:1: error: '::main' must return 'int'
   59 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:60:19: error: 'map' was not declared in this scope
   60 |         auto xy = map!(to!int)(readln().strip().split());
      |                   ^~~
a.cc:62:37: error: expected primary-expression before ']' token
   62 |                 auto m = new bool[][](10+4,10+4);
      |                                     ^
a.cc:64:25: error: 'to' was not declared in this scope
   64 |                 int n = to!int(readln().strip());
      |                         ^~
a.cc:65:29: error: expected ',' or ';' before '!' token
   65 |                 auto s = map!(to!int)(readln().strip().split());
      |                             ^
a.cc:67:25: error: 'i' was not declared in this scope
   67 |                 foreach(i; 0..n){
      |                         ^
a.cc:70:17: error: 'writeln' was not declared in this scope
   70 |                 writeln(f?"OK":"NA");
      |                 ^~~~~~~