Will It Stop?

No attempts yetTime limit3sMemory limit64 MB

Problem

Byteasar was wandering around a university library and, on one of its facades, noticed a piece of a program with the inscription "Will it stop?". The question seemed interesting, so after returning home he tried to tackle it. Unfortunately, while writing down the piece of code he made a mistake and noted:

while n > 1 do
  if n mod 2 = 0 then
    n := n / 2
  else
    n := 3 · n + 3

Byteasar is now trying to figure out, for which initial values of the variable nn the program he wrote down stops. We assume that the variable nn has an unbounded size, i.e., it may attain arbitrarily large values.

Input

The first and only line of input contains one integer nn (2n10142 \le n \le 10^{14}).

Output

In the first and only line of output, print a single word: TAK (i.e., "yes" in Polish) if the program stops for the given value of nn, or NIE ("no" in Polish) otherwise.