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 $ : ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1827E/636b5045dbd1d95c74fcfe21de52ce3103ecff1f.png) Sample 1 ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1827E/5e6bc53eeaf1c05a72aa8adb625cb08699ecaf80.png) Sample 2 ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1827E/a888d70cad2c6923d39db1e4ae24fc5352ba8193.png) Sample 4