Under construction

Still being built. Things may change

Grasshopper 2

Interview

Time limit1sMemory limit128 MB

Summary
Decide whether jumps of lengths s, s/2, s/4, and so on can reach or pass distance x in finitely many jumps.
Level

Easy3 of 10

Topics
Math
Solved
No attempts yet

Problem

A grasshopper wants to cross to the other side of a road. Its first jump can cover a length of ss, but because it grows tired, every following jump can cover only exactly half the length of the previous one. For example, a grasshopper starting with a jump of s=10s = 10 makes jumps of length 10,5,2.5,1.25,0.625,…10, 5, 2.5, 1.25, 0.625, \dots.

Given the width of the road, determine whether the grasshopper can reach the far edge (or go beyond it) in a finite number of jumps.

Input

The first and only line of standard input contains two integers xx and ss (1≤x,s≤1091 \le x, s \le 10^9), separated by a space: the width of the road and the length of the grasshopper's first jump, respectively.

Output

Print TAK on the first line if the grasshopper can cross to the other side, or NIE otherwise. (TAK means yes and NIE means no.)

Examples1

  1. Example 1

    Input
    11 6
    
    Expected output
    TAK