import math H, W = map(int, input().split()) g = math.gcd(H, W) h = H // g w = W // g if h == 4 and w == 3: print("TATE") else: # Since the problem states that other ratios won't be given print("YOKO")