{"raw_statement":[{"iden":"problem statement","content":"You are given a tree with $N$ vertices and $N-1$ edges.  \nThe vertices are numbered $1,2,\\ldots,N$. The $i$\\-th edge connects Vertex $a_i$ and Vertex $b_i$.\nDetermine whether this tree is a star.\nHere, a star is a tree where there is a vertex directly connected to all other vertices."},{"iden":"notes","content":"For the definition of a tree, see [Tree (graph theory) - Wikipedia](https://en.wikipedia.org/wiki/Tree_(graph_theory))."},{"iden":"constraints","content":"*   $3 \\leq N \\leq 10^5$\n*   $1 \\leq a_i \\lt b_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$a_1$ $b_1$\n$\\vdots$\n$a_{N-1}$ $b_{N-1}$"},{"iden":"sample input 1","content":"5\n1 4\n2 4\n3 4\n4 5"},{"iden":"sample output 1","content":"Yes\n\nThe given graph is a star."},{"iden":"sample input 2","content":"4\n2 4\n1 4\n2 3"},{"iden":"sample output 2","content":"No\n\nThe given graph is not a star."},{"iden":"sample input 3","content":"10\n9 10\n3 10\n4 10\n8 10\n1 10\n2 10\n7 10\n6 10\n5 10"},{"iden":"sample output 3","content":"Yes"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}