{"raw_statement":[{"iden":"problem statement","content":"There is a tree with $N$ vertices, numbered $1, 2, \\ldots, N$. For each $i$ ($1 \\leq i \\leq N - 1$), the $i$\\-th edge connects Vertex $x_i$ and $y_i$.\nTaro has decided to paint each vertex in white or black. Here, it is not allowed to paint two adjacent vertices both in black.\nFind the number of ways in which the vertices can be painted, modulo $10^9 + 7$."},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\leq N \\leq 10^5$\n*   $1 \\leq x_i, y_i \\leq N$\n*   The given graph is a tree."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$x_1$ $y_1$\n$x_2$ $y_2$\n$:$\n$x_{N - 1}$ $y_{N - 1}$"},{"iden":"sample input 1","content":"3\n1 2\n2 3"},{"iden":"sample output 1","content":"5\n\nThere are five ways to paint the vertices, as follows:\n![image](https://img.atcoder.jp/dp/indep_0_muffet.png)"},{"iden":"sample input 2","content":"4\n1 2\n1 3\n1 4"},{"iden":"sample output 2","content":"9\n\nThere are nine ways to paint the vertices, as follows:\n![image](https://img.atcoder.jp/dp/indep_1_muffet.png)"},{"iden":"sample input 3","content":"1"},{"iden":"sample output 3","content":"2"},{"iden":"sample input 4","content":"10\n8 5\n10 8\n6 5\n1 5\n4 8\n2 10\n3 6\n9 2\n1 7"},{"iden":"sample output 4","content":"157"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}