You are given a weighted tree with N nodes and N−1 edges.
E is defined as i=N∑i=1j=N∑j=i+1F(i,j). Also, F(i,j) is equal to = (Maximum value of the edge that is present on the simple path between node i and j) ×i×j
You are required to determine the value of E modulo 109+7.
Input format
Output format
Print the required value of E modulo 109+7.
Constraints
1≤N≤2×1051≤w≤1061≤u,v≤N