Connected Subgraph

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

Rikka draws a tree with nn vertices labeled by 1,2,,n1, 2, \ldots, n, and adds kk extra edges to it. Count the number of ways that she can remove zero or more edges to keep the remaining graph connected, modulo 998,244,353998\\,244\\,353.

입력

The first line contains two integers nn and kk (1n1051 \leq n \leq 10^5, 0k100 \leq k \leq 10). 

The ii-th of the following (n1)(n - 1) lines contains two integers a_ia\_i and b_ib\_i, which denotes a tree edge between vertices a_ia\_i and b_ib\_i (1a_i,b_in1 \leq a\_i, b\_i \leq n). It is guaranteed that these edges form a tree.

The ii-th of the last kk lines contains two integers u_iu\_i and v_iv\_i, which denote an extra edge between vertices u_iu\_i and v_iv\_i (1u_i,v_in1 \leq u\_i, v\_i \leq n). It is guaranteed that the resulting graph has no self-loops and no parallel edges.

출력

Print one integer: the number of ways to remove zero or more edges such that the graph remains connected, modulo 998,244,353998\\,244\\,353.