import Foundation

func main() {
    let n = Int(readLine()!)!
    var aList = [Double]()
    for _ in 0..<n {
        aList.append(Double(readLine()!)!)
    }
    let newList = aList.filter{$0.remainder(dividingBy: 1) == 0.0 || $0.remainder(dividingBy: 1) > 0.000000005 || $0.remainder(dividingBy: 1) < -0.000000005}
    let count = newList.count
    var answer = 0
    for i in 1...count-1 {
        for j in i+1...count {
            let product = newList[i-1] * newList[j-1]
            let isInteger = product.remainder(dividingBy: 1) == 0.0
            if  isInteger {
            answer += 1
            }
        }
    }
    print(answer)
}

main()


