CF1032F Vasya and Maximum Matching

Description

Vasya has got a tree consisting of $ n $ vertices. He wants to delete some (possibly zero) edges in this tree such that the maximum matching in the resulting graph is unique. He asks you to calculate the number of ways to choose a set of edges to remove. A matching in the graph is a subset of its edges such that there is no vertex incident to two (or more) edges from the subset. A maximum matching is a matching such that the number of edges in the subset is maximum possible among all matchings in this graph. Since the answer may be large, output it modulo $ 998244353 $ .

Input Format

N/A

Output Format

N/A

Explanation/Hint

Possible ways to delete edges in the first example: - delete $ (1, 2) $ and $ (1, 3) $ . - delete $ (1, 2) $ and $ (1, 4) $ . - delete $ (1, 3) $ and $ (1, 4) $ . - delete all edges. Possible ways to delete edges in the second example: - delete no edges. - delete $ (1, 2) $ and $ (2, 3) $ . - delete $ (1, 2) $ and $ (3, 4) $ . - delete $ (2, 3) $ and $ (3, 4) $ . - delete $ (2, 3) $ . - delete all edges.