My solution:
1. DFS from vertex "1" and find any one vertex at max depth (say v1). v1 is now one end of any one diameter-path of the tree.
2. DFS from v1 and find any one vertex at max depth (say v2). This also finds the diameter D.
3. DFS from v1 and find all paths of length D. Let there be p1 such paths.
4. DFS from v2 and find all paths of length D. Let there be p2 such paths.
5. Count the number of vertices which occur in all (p1+p2) paths (there must be at least one, because if we have 2 disjoint D-length paths then there must be another path of length at least D+1).
6. If count > 2 print yes else print no. If there are 3 or more such vertices they must form a path subgraph, which can be bypassed with the single edge.
Although this is O(n**2) worst case, and shows pretty terrible understanding of the subtree method in the editorial, I took the risk in favour of typing speed and got AC in fastest time by far (0.26) typing in around 10 minutes.