Mateo recently found the perfect decorations for his Christmas tree — more trees!
Specifically, his Christmas tree is a rooted tree $T$ initially with $M$ nodes, all painted green. He has another rooted tree $D$ that he uses as a reference for his decorations. Mateo uses the following process to put on all of his decorations:
After applying all the decorations, $T$ ends up containing $N$ nodes. Unfortunately, he realized that he had forgotten to record what $D$ is! To make things worse, he accidentally spilled water on $T$, washing off all the colour from the nodes. After all that, he labels the root of $T$ as $1$, and then labels the rest of the nodes from $2$ to $N$.
The only information he currently has is the final state of $T$, as well as $M$. Help him find the number of possible $D$ that he could have started with, where two possibilities are considered different if they are structurally distinct.
Rooted trees $A$ and $B$ are said to be structurally identical if and only if they have the same number of nodes $S$, and there is a way to label $A$’s nodes from $1$ to $S$ and $B$’s nodes from $1$ to $S$ such that:
Otherwise, $A$ and $B$ are considered structurally distinct.
The first line of input contains two space-separated integers $N$ and $M$.
The next $N − 1$ lines each contain two space-separated integers $u_i$ and $v_i$ ($1 ≤ u_i , v_i ≤ N$, $u_i \ne v_i$), describing an edge in $T$ connecting nodes $u_i$ and $v_i$. Note that $T$ is rooted at node $1$.
Output the number of possible $D$ that he could have started with, where two possibilities are considered different if they are structurally distinct.