Given a connected tree with \(N\) vertices and \(N-1\) edges, you must answer \(M\) queries of the type:
Note: A simple path is a path in a tree that does not have repeating vertices.
Input format
Output format
For each test case, answer all the \(M\) queries. For each query print \(\text{Yes}\) if there exists a simple path that contains all three vertices \(A\), \(B\), and \(C\), otherwise print \(\text{No}\). Print answer for each query in a new line.
Constraints
\(1 \leq T \leq 10^5 \\ 3 \leq N \leq 2×10^5 \\ 1≤u,v≤N\\ \\ 1 \leq M \leq 2×10^5\\ 1≤A, B, C≤N\ \\ \text{The sum of all values of N over all test cases doesn't exceed } 2×10^5 \\ \text{The sum of all values of M over all test cases doesn't exceed } 2×10^5\)
The first line denotes T = 1.
For test case \(1\):
We are given:
Now,