GTW has a tree of $n$ nodes, in which $m$ nodes are special nodes. The value of node $i$ is $v_i$.
$Dis(x, y)$ is defined as the greatest common divisor of the nodes in the chain between node $x$ and node $y$.
$Jabby(x, y)$ is defined as the number of special nodes in the chain between node $x$ and node $y$.
You are asked to calculate the value of $ans$, which is defined as follow.
$ans=\prod_{i=1}^{n}\prod_{j=i}^{n}max(1,Dis(i,j)*min(1,jabby(i,j)))$
Because $ans$ could be very large, you only need to print $ans$ modulo $10 ^ 9 + 7$.