{"raw_statement":[{"iden":"statement","content":"_A prime number is a number which has exactly two distinct divisors: one and itself. For example, numbers 2, 7, 3 are prime, and 1, 6, 4 are not._\n\n_The next prime number after _x_ is the **smallest** prime number greater than _x_. For example, the next prime number after 2 is 3, and the next prime number after 3 is 5. Note that there is exactly one next prime number after each number. So 5 **is not** the next prime number for 2._\n\nOne cold April morning Panoramix predicted that soon Kakofonix will break free from his straitjacket, and this will be a black day for the residents of the Gallic countryside.\n\nPanoramix's prophecy tells that if some day Asterix and Obelix beat exactly _x_ Roman soldiers, where _x_ is a prime number, and next day they beat exactly _y_ Roman soldiers, where _y_ is **the next prime number** after _x_, then it's time to wait for Armageddon, for nothing can shut Kakofonix up while he sings his infernal song.\n\nYesterday the Gauls beat _n_ Roman soldiers and it turned out that the number _n_ was prime! Today their victims were a troop of _m_ Romans (_m_ > _n_). Determine whether the Gauls should wait for the black day after today's victory of Asterix and Obelix?"},{"iden":"input","content":"The first and only input line contains two positive integers — _n_ and _m_ (2 ≤ _n_ < _m_ ≤ 50). It is guaranteed that _n_ is prime.\n\nPretests contain all the cases with restrictions 2 ≤ _n_ < _m_ ≤ 4."},{"iden":"output","content":"Print _YES_, if _m_ is the next prime number after _n_, or _NO_ otherwise."},{"iden":"examples","content":"Input\n\n3 5\n\nOutput\n\nYES\n\nInput\n\n7 11\n\nOutput\n\nYES\n\nInput\n\n7 9\n\nOutput\n\nNO"}],"translated_statement":[{"iden":"statement","content":"_质数是恰好有两个不同因数的数：1 和它本身。例如，数字 #cf_span[2]、#cf_span[7]、#cf_span[3] 是质数，而 #cf_span[1]、#cf_span[6]、#cf_span[4] 不是质数。_\n\n_在 #cf_span[x] 之后的下一个质数是大于 #cf_span[x] 的最小质数。例如，在 #cf_span[2] 之后的下一个质数是 #cf_span[3]，在 #cf_span[3] 之后的下一个质数是 #cf_span[5]。注意，每个数之后恰好存在一个下一个质数。因此，#cf_span[5] *不是* #cf_span[2] 的下一个质数。_\n\n一个寒冷的四月早晨，帕诺拉米克斯预言，卡科丰克斯很快将挣脱束缚，这将给高卢乡村的居民带来黑暗的一天。\n\n帕诺拉米克斯的预言说，如果某一天阿斯特里克斯和奥贝利克斯击败了恰好 #cf_span[x] 名罗马士兵，其中 #cf_span[x] 是质数，而第二天他们击败了恰好 #cf_span[y] 名罗马士兵，其中 #cf_span[y] 是 #cf_span[x] 之后的*下一个质数*，那么就该等待末日降临了，因为当卡科丰克斯唱起他那地狱般的歌曲时，没有任何东西能让他闭嘴。\n\n昨天，高卢人击败了 #cf_span[n] 名罗马士兵，结果发现 #cf_span[n] 是质数！今天他们的受害者是一支由 #cf_span[m] 名罗马士兵组成的部队（#cf_span[m > n]）。请判断高卢人是否应在今天的胜利之后等待黑暗之日的到来？\n\n输入仅包含一行，两个正整数 — #cf_span[n] 和 #cf_span[m]（#cf_span[2 ≤ n < m ≤ 50]）。保证 #cf_span[n] 是质数。\n\n预测试包含所有满足 #cf_span[2 ≤ n < m ≤ 4] 的情况。\n\n如果 #cf_span[m] 是 #cf_span[n] 之后的下一个质数，则输出 _YES_，否则输出 _NO_。\n\n"},{"iden":"input","content":"输入仅包含一行，两个正整数 — #cf_span[n] 和 #cf_span[m]（#cf_span[2 ≤ n < m ≤ 50]）。保证 #cf_span[n] 是质数。预测试包含所有满足 #cf_span[2 ≤ n < m ≤ 4] 的情况。"},{"iden":"output","content":"如果 #cf_span[m] 是 #cf_span[n] 之后的下一个质数，则输出 _YES_，否则输出 _NO_。"},{"iden":"examples","content":"输入\n3 5\n输出\nYES\n输入\n7 11\n输出\nYES\n输入\n7 9\n输出\nNO"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n, m \\in \\mathbb{Z}^+ $ such that $ 2 \\leq n < m \\leq 50 $, and $ n $ is prime.\n\nLet $ P \\subseteq \\mathbb{Z}^+ $ be the set of prime numbers.\n\n**Constraints**  \n1. $ n \\in P $  \n2. $ m > n $  \n3. $ m \\leq 50 $\n\n**Objective**  \nDetermine whether $ m $ is the smallest prime number strictly greater than $ n $, i.e.,  \n$$\nm = \\min \\{ p \\in P \\mid p > n \\}\n$$\n\nOutput \"YES\" if true, \"NO\" otherwise.","simple_statement":null,"has_page_source":false}