1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>

using namespace std;

int main()
{
	long n;
	cin >> n;
	while (n > 21)
	{
		short a = n % 10;
		n /= 10;
		short b = n % 10;
		if ((a == 2 || a == 3 || a == 5 || a == 7) && (b == 2 || b == 3 || b == 5 || b == 7))
		{
			cout << "TAK";
			return 0;
		}
	}
	cout << "NIE";
	return 0;
}