CF1827E Bus Routes
Description
There is a country consisting of $ n $ cities and $ n - 1 $ bidirectional roads connecting them such that we can travel between any two cities using these roads. In other words, these cities and roads form a tree.
There are $ m $ bus routes connecting the cities together. A bus route between city $ x $ and city $ y $ allows you to travel between any two cities in the simple path between $ x $ and $ y $ with this route.
Determine if for every pair of cities $ u $ and $ v $ , you can travel from $ u $ to $ v $ using at most two bus routes.
Input Format
N/A
Output Format
N/A
Explanation/Hint
Here are the graphs of test case $ 1 $ , $ 2 $ , and $ 4 $ :
 Sample 1  Sample 2  Sample 4