func main() var n: int :: cui@inputInt() var dic: dict<[]char, int> :: #dict<[]char, int> do dic.add("WA", 1) do dic.add("TLE", 2) do dic.add("MLE", 3) do dic.add("OLE", 4) do dic.add("RE", 5) for(0, n - 1) var a: []int :: #[6]int var b: []int :: #[6]int var num: int :: 0 for i(0, 5) do a[i] :: cui@inputInt() do num :+ a[i] end for for i(0, 5) do b[i] :: cui@inputInt() end for var x: []char :: cui@input() var ans: bool :: a[dic.get(x, &)] <> num & b[dic.get(x, &)] = num do cui@print(ans ?("Yes\n", "No\n")) end for end func