{"trustable":true,"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":"\u003cp\u003eLet\u0027s call an array \u003cspan class\u003d\"tex-font-style-it\"\u003egood\u003c/span\u003e if there is an element in the array that equals to the sum of all other elements. For example, the array $$$a\u003d[1, 3, 3, 7]$$$ is good because there is the element $$$a_4\u003d7$$$ which equals to the sum $$$1 + 3 + 3$$$.\u003c/p\u003e\u003cp\u003eYou are given an array $$$a$$$ consisting of $$$n$$$ integers. Your task is to print all indices $$$j$$$ of this array such that after removing the $$$j$$$-th element from the array it will be \u003cspan class\u003d\"tex-font-style-it\"\u003egood\u003c/span\u003e (let\u0027s call such indices \u003cspan class\u003d\"tex-font-style-it\"\u003enice\u003c/span\u003e).\u003c/p\u003e\u003cp\u003eFor example, if $$$a\u003d[8, 3, 5, 2]$$$, the \u003cspan class\u003d\"tex-font-style-it\"\u003enice\u003c/span\u003e indices are $$$1$$$ and $$$4$$$: \u003c/p\u003e\u003cul\u003e \u003cli\u003e if you remove $$$a_1$$$, the array will look like $$$[3, 5, 2]$$$ and it is \u003cspan class\u003d\"tex-font-style-it\"\u003egood\u003c/span\u003e; \u003c/li\u003e\u003cli\u003e if you remove $$$a_4$$$, the array will look like $$$[8, 3, 5]$$$ and it is \u003cspan class\u003d\"tex-font-style-it\"\u003egood\u003c/span\u003e. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eYou have to consider all removals \u003cspan class\u003d\"tex-font-style-bf\"\u003eindependently\u003c/span\u003e, i. e. remove the element, check if the resulting array is \u003cspan class\u003d\"tex-font-style-it\"\u003egood\u003c/span\u003e, and return the element into the array.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of the input contains one integer $$$n$$$ ($$$2 \\le n \\le 2 \\cdot 10^5$$$) — the number of elements in the array $$$a$$$.\u003c/p\u003e\u003cp\u003eThe second line of the input contains $$$n$$$ integers $$$a_1, a_2, \\dots, a_n$$$ ($$$1 \\le a_i \\le 10^6$$$) — elements of the array $$$a$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eIn the first line print one integer $$$k$$$ — the number of indices $$$j$$$ of the array $$$a$$$ such that after removing the $$$j$$$-th element from the array it will be \u003cspan class\u003d\"tex-font-style-it\"\u003egood\u003c/span\u003e (i.e. print the number of the \u003cspan class\u003d\"tex-font-style-it\"\u003enice\u003c/span\u003e indices).\u003c/p\u003e\u003cp\u003eIn the second line print $$$k$$$ distinct integers $$$j_1, j_2, \\dots, j_k$$$ in \u003cspan class\u003d\"tex-font-style-bf\"\u003eany\u003c/span\u003e order — \u003cspan class\u003d\"tex-font-style-it\"\u003enice\u003c/span\u003e indices of the array $$$a$$$.\u003c/p\u003e\u003cp\u003eIf there are no such indices in the array $$$a$$$, just print $$$0$$$ in the first line and leave the second line empty or do not print it at all.\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\n2 5 1 2 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\n4 1 5\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\n8 3 5 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n1 4 \n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\n2 1 2 4 3\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0\n\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first example you can remove any element with the value $$$2$$$ so the array will look like $$$[5, 1, 2, 2]$$$. The sum of this array is $$$10$$$ and there is an element equals to the sum of remaining elements ($$$5 \u003d 1 + 2 + 2$$$).\u003c/p\u003e\u003cp\u003eIn the second example you can remove $$$8$$$ so the array will look like $$$[3, 5, 2]$$$. The sum of this array is $$$10$$$ and there is an element equals to the sum of remaining elements ($$$5 \u003d 3 + 2$$$). You can also remove $$$2$$$ so the array will look like $$$[8, 3, 5]$$$. The sum of this array is $$$16$$$ and there is an element equals to the sum of remaining elements ($$$8 \u003d 3 + 5$$$).\u003c/p\u003e\u003cp\u003eIn the third example you cannot make the given array \u003cspan class\u003d\"tex-font-style-it\"\u003egood\u003c/span\u003e by removing exactly one element.\u003c/p\u003e"}}]}