cf/mirror

The 67th Tree Problem

CF
2218F1500· specialist4s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
7
1 1
2 1
0 3
3 4
0 2
1 0
4 7
Output
YES
1 2
NO
YES
1 2
1 3
YES
1 2
2 3
3 4
4 5
5 6
6 7
NO
NO
YES
1 2
2 3
3 4
4 5
4 11
2 6
6 7
7 8
2 9
9 10
2218F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…