Byteasar was wandering around the library of the University of Warsaw and at one of its facades
he noticed a piece of a program with an inscription "Will it stop?".
The question seemed interesting, so Byteasar tried to tackle it after returning home.
Unfortunately, when he was writing down the piece of code he made a mistake and noted:
while n > 1
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
the program he wrote down stops.
We assume that the variable has an unbounded size, i.e., it may attain arbitrarily large values.
Input
The first and only line of input contains one integer ().
Output
In the first and only line of output you should write a single word TAK
(i.e., yes in Polish), if the program stops for the given value of ,
or NIE (no in Polish) otherwise.
Example
For the input data:
4
the correct result is:
TAK
Task author: Jakub Lacki.
Kontakt
W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem szkopul@fri.edu.pl.
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, odwiedź nasze serwery na Discordzie. Są one moderowane przez społeczność, ale członkowie zespołu wsparcia również aktywnie się tam udzielają.