{"raw_statement":[{"iden":"statement","content":"Today, Wet Shark was given a list of non-necessarily distinct prime integers, a1, a2, ...an.\n\nWet Shark defines k as the smallest integer such that for 1 ≤ i ≤ n, k mod ai = ai - 1.\n\nWet Shark also has an additional integer, o. Tell Wet Shark whether or not k is divisible by o.\n\nThe first line contains one integer, n 1 ≤ n ≤ 100000.\n\nThe second line consists of n space separated integers, the list of primes. Each prime ranges from 2 to 100000.\n\nThe third line consists of the additional integer, o, ranging from 1 to 100000.\n\nIf k is divisible by o, output \"YES\". Else, output \"NO\".\n\n"},{"iden":"input","content":"The first line contains one integer, n 1 ≤ n ≤ 100000.The second line consists of n space separated integers, the list of primes. Each prime ranges from 2 to 100000.The third line consists of the additional integer, o, ranging from 1 to 100000."},{"iden":"output","content":"If k is divisible by o, output \"YES\". Else, output \"NO\"."},{"iden":"examples","content":"Input132OutputYESInput23 34OutputNO"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ T \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, T\\} $:  \n- Let $ n_k \\in \\mathbb{Z} $ denote the length of the array.  \n- Let $ A_k = (a_{k,1}, a_{k,2}, \\dots, a_{k,n_k}) $ be a sequence of positive integers.  \n\n**Constraints**  \n1. $ 1 \\le T \\le 64 $  \n2. For each $ k \\in \\{1, \\dots, T\\} $:  \n   - $ 1 \\le n_k \\le 5000 $  \n   - $ 1 \\le a_{k,i} \\le 10^6 $ for all $ i \\in \\{1, \\dots, n_k\\} $  \n3. $ \\sum_{k=1}^{T} n_k \\le 72000 $  \n\n**Objective**  \nCount the number of valid queries $ (l, r) $ with $ 1 \\le l \\le r \\le n_k $ such that in the subarray $ (a_{k,l}, a_{k,l+1}, \\dots, a_{k,r}) $, **exactly one distinct value** occurs an odd number of times, and all other values occur an even number of times.","simple_statement":"Given an array of n positive integers, count how many subarrays have exactly one number appearing an odd number of times (all others appear even times).","has_page_source":false}