h,w = gets.split.map(&:to_i) x = h.gcd(w) h /= x puts h == 4 ? "TATE" : "YOKO"