{"problem":{"name":"C. LCM Query","description":{"content":"De Prezer loves lcm (Least Common Multiple).Ha has got a sequence a1, a2, ..., an but doesn't know how to calculate lcm of two numbers. De Prezer also loves query.So he asks you to answer to m querie","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":4000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10057C"},"statements":[{"statement_type":"Markdown","content":"De Prezer loves lcm (Least Common Multiple).Ha has got a sequence a1, a2, ..., an but doesn't know how to calculate lcm of two numbers.\n\nDe Prezer also loves query.So he asks you to answer to m queries on this sequence.\n\nIn each query, he gives you number x and you should print the following number : \n\n lcm(ai, ai + 1, ..., ai + x - 1)\n\nAnswer can be very large, so print it modulo 109 + 7 .\n\nThe first line of input consists of 2 integers n and m.\n\nThe second line of input contains n space separated integers a1, a2, ..., an.\n\nThe next m lines, each line contains an integer x.\n\n1 ≤ n ≤ 2 * 104\n\n1 ≤ m ≤ 106\n\n1 ≤ ai ≤ 60 (For each 1 ≤ i ≤ n)\n\n1 ≤ x ≤ n\n\nPrint m lines, each answer to one query.\n\n## Input\n\nThe first line of input consists of 2 integers n and m.The second line of input contains n space separated integers a1, a2, ..., an.The next m lines, each line contains an integer x.1 ≤ n ≤ 2 * 1041 ≤ m ≤ 1061 ≤ ai ≤ 60 (For each 1 ≤ i ≤ n)1 ≤ x ≤ n\n\n## Output\n\nPrint m lines, each answer to one query.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ a, b \\in \\mathbb{Z} $ be two positive integers represented as decimal strings, with $ 1 \\leq a, b \\leq 10^{1000} $.\n\n**Constraints**  \n- $ a $ and $ b $ are given as decimal strings (possibly with leading zeros in input, but represent positive integers).  \n- The number of digits in $ a $ and $ b $ is at most $ 1000 $.  \n\n**Objective**  \nCompute $ c = a + b $, and output $ c $ as a decimal integer (without leading zeros).","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10057C","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}