#include <iostream>
using namespace std;
unsigned long long a,b,c,k;
int main() {
cin>>a>>b>>c;
k=a*b;
if(a<b)
{
if(a>c)
{
cout<<"NIE";
}
}
else
if(b<a)
{
if(b>c)
{
cout<<"NIE" ;
}
}
if(a==c||b==c)
{
cout<<"TAK";
}
if(c%a==0)
{
cout<<"TAK";
}
else
if(c%b==0)
{
cout<<"TAK";}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwp1bnNpZ25lZCBsb25nIGxvbmcgYSxiLGMsazsKaW50IG1haW4oKSB7CmNpbj4+YT4+Yj4+YzsKaz1hKmI7CmlmKGE8YikKCQl7CmlmKGE+YykKCQl7CmNvdXQ8PCJOSUUiOwoJCX0KCQkKCQl9CmVsc2UKaWYoYjxhKQoJCXsKaWYoYj5jKQkKCXsKY291dDw8Ik5JRSIJOwoJfQoJCX0KaWYoYT09Y3x8Yj09YykKCXsKY291dDw8IlRBSyI7Cgl9CglpZihjJWE9PTApCnsKCWNvdXQ8PCJUQUsiOwp9CmVsc2UKaWYoYyViPT0wKQp7Cgljb3V0PDwiVEFLIjt9CgoJcmV0dXJuIDA7Cn0=