{"raw_statement":[{"iden":"problem statement","content":"We have an integer sequence of length $N$: $A_0,A_1,\\cdots,A_{N-1}$.\nFind the following sum ($\\mathrm{lcm}(a, b)$ denotes the least common multiple of $a$ and $b$):\n\n*   $\\sum_{i=0}^{N-2} \\sum_{j=i+1}^{N-1} \\mathrm{lcm}(A_i,A_j)$\n\nSince the answer may be enormous, compute it modulo $998244353$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 200000$\n*   $1 \\leq A_i \\leq 1000000$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$A_0\\ A_1\\ \\cdots\\ A_{N-1}$"},{"iden":"sample input 1","content":"3\n2 4 6"},{"iden":"sample output 1","content":"22\n\n$\\mathrm{lcm}(2,4)+\\mathrm{lcm}(2,6)+\\mathrm{lcm}(4,6)=4+6+12=22$."},{"iden":"sample input 2","content":"8\n1 2 3 4 6 8 12 12"},{"iden":"sample output 2","content":"313"},{"iden":"sample input 3","content":"10\n356822 296174 484500 710640 518322 888250 259161 609120 592348 713644"},{"iden":"sample output 3","content":"353891724"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}