시간 제한메모리 제한제출정답맞힌 사람정답 비율
4 초 512 MB111100.000%

문제

Consider the following boring game about removing nodes from a forest. Initially, the forest contains only one tree with $N$ nodes, and your initial score is $0$. The game then goes as follows:

  1. If the forest is empty, the game is finished. Otherwise, you choose one node from the current forest uniformly at random.
  2. Your score increases by the size of the tree which your chosen node belongs to.
  3. Remove your chosen node and all edges connected to this node. Then proceed to step 1.

Please calculate the expected value of your final score multiplied by $N!$, modulo $10^9+7$.

입력

The first line of input contains one integer $N$ indicating the number of nodes in the initial tree.

Each of the following $N-1$ lines contains two integers $x$ and $y$, indicating that $x$-th node and $y$-th node are connected by an edge in the given tree. The nodes are numbered from $1$ to $N$.

출력

Output one number: the expected value of the final score of this boring game multiplied by $N!$, modulo $10^9+7$.

제한

  • $1 \le N \le 10^5$
  • $1 \le x, y \le N$
  • The given graph is a tree

예제 입력 1

2
1 2

예제 출력 1

6

예제 입력 2

3
1 2
2 3

예제 출력 2

34