{"raw_statement":[{"iden":"problem statement","content":"Snuke has $1$ gram of gold and $0$ grams of silver now. He will do trading of gold and silver for the following $N$ days. On each day, he has two choices: do nothing, or make a trade. If he trades on Day $i$ ($1 \\leq i \\leq N$), the following will happen.\n\n*   If he has $x$ grams of gold before the trade, exchange all of it for $x \\times A_i$ grams of silver. On the other hand, if he has $x$ grams of silver, exchange all of it for $x / A_i$ grams of gold.\n\nSnuke's objective is to maximize the amount of gold he has in the end. Find one way to achieve his objective."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 200000$\n*   $1 \\leq A_i \\leq 10^9$\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_1$ $A_2$ $\\cdots$ $A_N$"},{"iden":"sample input 1","content":"3\n3 5 2"},{"iden":"sample output 1","content":"0 1 1\n\nThe optimal sequence of actions is as follows.\n\n*   Day $1$: Do nothing.\n    \n*   Day $2$: Exchange $1$ gram of gold for $5$ grams of silver.\n    \n*   Day $3$: Exchange $5$ grams of silver for $2.5$ grams of gold."},{"iden":"sample input 2","content":"4\n1 1 1 1"},{"iden":"sample output 2","content":"0 0 0 0\n\n$(v_1,v_2,v_3,v_4)=(1,1,1,1)$, for example, is also considered correct."},{"iden":"sample input 3","content":"10\n426877385 186049196 624834740 836880476 19698398 709113743 436942115 436942115 436942115 503843678"},{"iden":"sample output 3","content":"1 1 0 1 1 1 1 0 0 0"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}