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
scorpion_ajay:
20161219 17:02:38
use your pen :p 

humble_fool:
20161209 07:53:15
AC in one go. Bits manipulation is the key. Although you can do it using log2 but try Bits Manipulation, you will learn something new. :) 

spartax:
20161130 07:07:47
HINT: if n is a power of 2, it gets reduced to 1. and if n is not a power of 2, then if n is even, it becomes odd. Think what happens to odd integers and you'll get theta(1) solution :) 

radeonguy:
20161128 18:29:04
HINT : you may want to use double instead of float if using log2 

mohitgupta07:
20161117 10:21:02
Donot use that log function. It will give you wa... find another way to get power of 2. umm... how about bit manipulation ;) 

aditya_rev:
20161103 18:01:28
ez as brainf##ck 

sudiptob2:
20161024 09:12:06
For those who are getting WA for log(n)/log(2)


d_pawan_kumar:
20161017 09:32:37
use unsigned long long ,long int costed me two WA..simple logic..;) 

sam_b:
20161012 13:37:44
long long won't be enough. use unsigned long long. very simple logic


ani_geek9654:
20161011 09:07:35
FORGOT LONG LONG MISSED AC IN ONE :( 
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 