1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include<cstdio>
#include<vector>
using namespace std;
#define int long long

main()
{
	vector<int> fib;
	fib.push_back(0);
	fib.push_back(1);
	while(fib.back() < 1<<30)
		fib.push_back(fib[fib.size()-2]+fib.back());
	int t;
	scanf("%lld",&t);
	while(t--)
	{
		int n;
		scanf("%lld",&n);
		bool flag=false;
		for(auto i : fib)
			for(auto j : fib)
				if(i*j==n)
					flag=true;
		printf("%s\n",flag ? "TAK" : "NIE");
	}	
}