#include <iostream>
#include <string>
using namespace std;

int main(){
	while (true)
	{
		int x[200] = {};
		int a;
		cin >> a;
		if (cin.eof()) { break; }
		while (true)
		{
			x[a]++;
			x[a] = x[a] % 2;
			cin >> a;
			if (a == 0) { break; }
		}
		int count = 0;
		for(int i=1;i<101;i++){
			if (x[i] == 1) { count++; }
		}
		if(count ==0||count == 2){
			cout << "OK" << endl;
		}
		else{
			cout << "NO" << endl;
		}
	}
	return 0;
}