cf/mirror

Chemistry in Berland

CF
846E2300· international master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
3
1 2 3
3 2 1
1 1
1 1
Output
YES
Sample 2of 2
Input
3
3 2 1
1 2 3
1 1
1 2
Output
NO
846E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…