<>; ++$_[$_]for@A=glob<>; for$i(1..100){ for$j($i+1..100){ for$k($j+1..100){ ($x+=$_[$i]*$_[$j]*$_[$k])%=1e9+7 } } } print$x