output_description: Print the number of pairs with integer product A_i \cdot A_j (and i < j).
  
  * * *
input_description: Input is given from Standard Input in the following format.
  
      
      
      N
      A_1
      A_2
      \vdots
      A_N
attempt: n = int(input())
  fives, twos, dec = [], [], []
  for i in range(n):
      r = input()
      if "." in r:
          dec.append(len(r) - r.index(".") - 1)
          if r[r.index(".") + 1 :].count("0") == dec[i]:
              r = r[: r.index(".")]
              dec[i] = 0
          else:
              r = r.replace(".", "")
      else:
          dec.append(0)
      q = int(r)
      cf, ct = 0, 0
      while q % 5 == 0:
          q /= 5
          cf += 1
      while q % 2 == 0:
          q /= 2
          ct += 1
      fives.append(cf)
      twos.append(ct)
  count = 0
  for i in range(n):
      for j in range(i + 1, n):
          f, t, d = (fives[i] + fives[j]), (twos[i] + twos[j]), max(dec[i], dec[j])
          if min(f, t) >= d:
              count += 1
  print(count)
  
problem_description: Statement
  
  You are given N real values A_1, A_2, \ldots, A_N. Compute the number of pairs
  of indices (i, j) such that i < j and the product A_i \cdot A_j is integer.
samples: [{"input": "5\n    7.5\n    2.4\n    17.000000001\n    17\n    16.000000000", "output": "3\n    \n\nThere are 3 pairs with integer product:\n\n  * 7.5 \\cdot 2.4 = 18\n  * 7.5 \\cdot 16 = 120\n  * 17 \\cdot 16 = 272\n\n* * *"}, {"input": "11\n    0.9\n    1\n    1\n    1.25\n    2.30000\n    5\n    70\n    0.000000001\n    9999.999999999\n    0.999999999\n    1.000000001", "output": "8"}]