{"raw_statement":[{"iden":"problem statement","content":"You are given an integer sequence $A = (A_1, \\dots, A_N)$ of length $N$.\nFind the number of triplets of integers $(i, j, k)$ satisfying all of the conditions below.\n\n*   $1 \\leq i, j, k \\leq N$\n*   $\\frac{A_i}{A_j} = A_k$"},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2 \\times 10^5$\n*   $1 \\leq A_i \\leq 2 \\times 10^5 \\, (1 \\leq i \\leq N)$\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$ $\\ldots$ $A_N$"},{"iden":"sample input 1","content":"3\n6 2 3"},{"iden":"sample output 1","content":"2\n\n$(i, j, k) = (1, 2, 3), (1, 3, 2)$ satisfy the conditions."},{"iden":"sample input 2","content":"1\n2"},{"iden":"sample output 2","content":"0"},{"iden":"sample input 3","content":"10\n1 3 2 4 6 8 2 2 3 7"},{"iden":"sample output 3","content":"62"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}