{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"给你一个长度为n的序列,这里面有m对好整数对。给出的m对好整数对一定满足的条件是:对于两个整数的位置i, j, 1 \u003c\u003d i \u003c j \u003c\u003d n \u0026\u0026 i + j是奇数\u003cbr\u003e\n你可以执行以下操作:选定一个好整数对,让它们两同时除以一个大于1的公约数。\u003cbr\u003e\n问你最大能执行多少次操作。"}},{"title":"Input","value":{"format":"HTML","content":"第一行两个整数n, m(2 \u003c\u003d n \u003c\u003d 100, 1 \u003c\u003d m \u003c\u003d 100)\u003cbr\u003e\n第二行n个数描述这个序列,1 \u003c\u003d a[i] \u003c\u003d 1e9\u003cbr\u003e\n接下来的m行描述m对给定的好整数对,用两个位置i, j描述。1 \u003c\u003d i \u003c j \u003c\u003d n\u003cbr\u003e\n保证没有相同的i, j"}},{"title":"Output","value":{"format":"HTML","content":"输出一个整数表示答案。"}},{"title":"Examples","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e3 2\u003cbr\u003e8 3 8\u003cbr\u003e1 2\u003cbr\u003e2 3\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e0\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e3 2\u003cbr\u003e8 12 8\u003cbr\u003e1 2\u003cbr\u003e2 3\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e2\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}}]}