{"raw_statement":[{"iden":"statement","content":"PolandBall is playing a game with EnemyBall. The rules are simple. Players have to say words in turns. You cannot say a word which was already said. PolandBall starts. The Ball which can't say a new word loses.\n\nYou're given two lists of words familiar to PolandBall and EnemyBall. Can you determine who wins the game, if both play optimally?"},{"iden":"input","content":"The first input line contains two integers _n_ and _m_ (1 ≤ _n_, _m_ ≤ 103) — number of words PolandBall and EnemyBall know, respectively.\n\nThen _n_ strings follow, one per line — words familiar to PolandBall.\n\nThen _m_ strings follow, one per line — words familiar to EnemyBall.\n\nNote that one Ball **cannot** know a word more than once (strings are unique), but some words **can** be known by both players.\n\nEach word is non-empty and consists of no more than 500 lowercase English alphabet letters."},{"iden":"output","content":"In a single line of print the answer — \"_YES_\" if PolandBall wins and \"_NO_\" otherwise. Both Balls play optimally."},{"iden":"examples","content":"Input\n\n5 1\npolandball\nis\na\ncool\ncharacter\nnope\n\nOutput\n\nYES\n\nInput\n\n2 2\nkremowka\nwadowicka\nkremowka\nwiedenska\n\nOutput\n\nYES\n\nInput\n\n1 2\na\na\nb\n\nOutput\n\nNO"},{"iden":"note","content":"In the first example PolandBall knows much more words and wins effortlessly.\n\nIn the second example if PolandBall says _kremowka_ first, then EnemyBall cannot use that word anymore. EnemyBall can only say _wiedenska_. PolandBall says _wadowicka_ and wins."}],"translated_statement":[{"iden":"statement","content":"PolandBall 正在与 EnemyBall 玩一个游戏。规则很简单：玩家轮流说出单词，不能说出之前已经说过的单词。PolandBall 先手。无法说出新单词的玩家输。\n\n给你两个列表，分别表示 PolandBall 和 EnemyBall 已知的单词。你能确定在双方都采取最优策略的情况下，谁会赢吗？\n\n第一行输入包含两个整数 #cf_span[n] 和 #cf_span[m]（#cf_span[1 ≤ n, m ≤ 103]）——分别表示 PolandBall 和 EnemyBall 已知的单词数量。\n\n接下来 #cf_span[n] 行，每行一个字符串——PolandBall 已知的单词。\n\n再接下来 #cf_span[m] 行，每行一个字符串——EnemyBall 已知的单词。\n\n注意，每个 Ball 不会重复知道同一个单词（字符串唯一），但某些单词可能被两个玩家都知道。\n\n每个单词非空，且由不超过 #cf_span[500] 个小写英文字母组成。\n\n请在一行中输出答案：如果 PolandBall 获胜，输出 \"_YES_\"；否则输出 \"_NO_\"。双方均采取最优策略。\n\n在第一个示例中，PolandBall 知道的单词多得多，轻松获胜。\n\n在第二个示例中，如果 PolandBall 首先说 _kremowka_，那么 EnemyBall 就不能再使用这个词。EnemyBall 只能说 _wiedenska_。PolandBall 再说 _wadowicka_ 并获胜。"},{"iden":"input","content":"第一行输入包含两个整数 #cf_span[n] 和 #cf_span[m]（#cf_span[1 ≤ n, m ≤ 103]）——分别表示 PolandBall 和 EnemyBall 已知的单词数量。接下来 #cf_span[n] 行，每行一个字符串——PolandBall 已知的单词。再接下来 #cf_span[m] 行，每行一个字符串——EnemyBall 已知的单词。注意，每个 Ball 不会重复知道同一个单词（字符串唯一），但某些单词可能被两个玩家都知道。每个单词非空，且由不超过 #cf_span[500] 个小写英文字母组成。"},{"iden":"output","content":"请在一行中输出答案：如果 PolandBall 获胜，输出 \"_YES_\"；否则输出 \"_NO_\"。双方均采取最优策略。"},{"iden":"examples","content":"输入\n5 1\npolandball\nis\na\ncool\ncharacter\nnope\n输出\nYES\n\n输入\n2 2\nkremowka\nwadowicka\nkremowka\nwiedenska\n输出\nYES\n\n输入\n1 2\na\na\nb\n输出\nNO"},{"iden":"note","content":"在第一个示例中，PolandBall 知道的单词多得多，轻松获胜。\n\n在第二个示例中，如果 PolandBall 首先说 _kremowka_，那么 EnemyBall 就不能再使用这个词。EnemyBall 只能说 _wiedenska_。PolandBall 再说 _wadowicka_ 并获胜。"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ P $ be the set of words known only to PolandBall.  \nLet $ E $ be the set of words known only to EnemyBall.  \nLet $ B = P \\cap E $ be the set of words known to both players.  \n\nLet $ p = |P| $, $ e = |E| $, $ b = |B| $.  \n\n**Constraints**  \n$ 1 \\leq p + b \\leq 10^3 $,  \n$ 1 \\leq e + b \\leq 10^3 $,  \nAll words are distinct strings of lowercase English letters, length ≤ 500.  \n\n**Objective**  \nDetermine the winner under optimal play, with PolandBall starting.  \nPlayers alternate turns, cannot repeat any word ever said.  \nThe player unable to move loses.  \n\nThe total number of distinct words is $ p + e + b $.  \nOptimal play: both players will use shared words $ B $ strategically to force the opponent into a losing position.  \n\n**Winning Condition**  \nPolandBall wins if and only if:  \n$$\np + b > e\n$$  \nOutput \"YES\" if PolandBall wins, \"NO\" otherwise.","simple_statement":null,"has_page_source":false}