From Tree to Graph
时间限制:C/C++/Rust/Pascal 8秒,其他语言16秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

Bobo has a tree of n vertices numbered with .
He subsequently adds m edges between vertex x_i and
where is the vertex lying on the unique tree path between vertex x_i and y_i and closest to the vertex 0.

Let the graph obtained by adding the edges to the tree be G_i,
and f_i(u) be the number of connected components after the removal of vertex u from G_i.
Bobo knows that for

( denotes xor.)

Given a, b, x_0, y_0, he also knows that for ,

* ,
* .

Help him to find x_m, y_m.

输入描述:

The input consists of several test cases and is terminated by end-of-file.

The first line of each test case contains six integers n, m, a, b, x_0, y_0.
The i-th of the following (n - 1) lines contains two integers u_i and v_i, which denotes the tree edge between vertex u_i and v_i.

输出描述:

For each test case, print two integers which denote x_m, y_m.
示例1

输入

复制
4 1 1 0 2 3
0 1
1 2
0 3
4 2 1 0 2 0
0 1
1 2
2 3
5 25 1 2 3 4
0 1
0 2
1 3
1 4

输出

复制
2 3
1 3
1 0

说明

The following table shows the detailed value for the second sample.

备注:

* 
*
*
* The sum of n does not exceed 25,000.