{"raw_statement":[{"iden":"problem statement","content":"You are given $N$ integers $A_1, A_2, \\dots, A_N$.  \nFind the number of triples of integers $(i, j, k)$ that satisfy the following conditions:\n\n*   $1 \\le i, j, k \\le N$\n*   $A_i \\times A_j = A_k$"},{"iden":"constraints","content":"*   $1 \\le N \\le 1000$\n*   $\\color{red}{1 \\le A_i < 10^{1000}}$"},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$A_1$\n$A_2$\n$\\vdots$\n$A_N$"},{"iden":"sample input 1","content":"5\n2\n3\n6\n12\n24"},{"iden":"sample output 1","content":"6\n\nThe following six triples $(i, j, k)$ satisfy the conditions in the problem statement:\n\n*   $(1, 2, 3)$\n*   $(1, 3, 4)$\n*   $(1, 4, 5)$\n*   $(2, 1, 3)$\n*   $(3, 1, 4)$\n*   $(4, 1, 5)$"},{"iden":"sample input 2","content":"11\n1\n2\n3\n4\n5\n6\n123456789123456789\n123456789123456789\n987654321987654321\n987654321987654321\n121932631356500531347203169112635269"},{"iden":"sample output 2","content":"40\n\nNote that the values of each integer $A_i$ can be huge."},{"iden":"sample input 3","content":"9\n4\n4\n4\n2\n2\n2\n1\n1\n1"},{"iden":"sample output 3","content":"162\n\nNote that there may be duplicates among the values of $A_i$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}