time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
After returning from the army Makes received a gift — an array a consisting of n positive integer numbers. He hadn't been solving problems for a long time, so he became interested to answer a particular question: how many triples of indices (i, j, k) (i < j < k), such that ai·a