program abc34
 implicit none
 integer::N,ia,ib,ic,c=0
 real(16),allocatable::a(:)
 read(*,*)N
 allocate(a(N))
 do ia=1,N
  read(*,*)a(ia)
 end do
 do ib=1,N-1
  do ic=ib+1,N
   if(a(ib)*a(ic)==floor(a(ib)*a(ic)))then
    c=c+1
   end if
  end do
 end do
 print'(i0)',c
 deallocate(a)
end program abc34