WILLITST  Will it ever stop
When Bob was in library in University of Warsaw he saw on one of facades caption :"Will it ever stop?" and below some mysterious code:
while n > 1 if n mod 2 = 0 then n:=n/2 else n:=3*n+3
Help him finding it out !
Input
In first line one number n<=10^14.
Output
Print "TAK" if program will stop, otherwise print "NIE"
Example
Input: 4 Output: TAK
hide comments
stormborn_:
20190329 12:23:32
why is log floor and ceil combination giving wrong ans in c


rahulrawat09:
20190322 19:02:40
if(n>1&&ceil(log2(n))==floor(log2(n)))


ramnarayanaram:
20190123 17:06:48
c++ just two lines of code ,


anirudhg:
20190117 14:18:59
hint : Use Bitwise & operator to check if n is of form 2^m.


as10071999:
20190114 19:19:21
Check For case <=1 and simple logic 

aashish_a2z:
20181214 23:16:16
AC in one go...Observe the pattern.


piyushchavan88:
20181214 18:41:12
Use mp boost library of c++ for input.


daku5768:
20181214 12:32:43
if anywhere in loop if n is divisible by 3 ,print NIE and return 

laidactienbn:
20181123 15:00:58
This is such an interesting prob.


priyanshu_pg:
20181117 11:53:25
I am maintaining a set and checking whether the no has earlier occurred in set or not. In case a no repeats itself, I am breaking the loop for NIE. Still I am getting WA. Kindly help 
Added by:  Krzysztof Lewko 
Date:  20111109 
Time limit:  0.906s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  AMPPZ 2011 