P "Today is the recording of a program of a liver test project."

O-type Chieri "Ki, Kimo no good ..."

Kanako Shimura "Is Chieri-chan okay?"

Akane Tsukino "As expected, Mr. P! It's a wonderful commentary that clearly shows the situation in one line! Come on! Let's run toward the fireball!"

P "The rules are simple, we just work together to visit all the shrines in this area."

Akane "It's orthodox! Let's run toward the shrine immediately!"

Kanako "But there were many shrines that had to be visited at one of the highest density of shrines in Japan ..."

Kanako "But it's encouraging to have Akane!"

P "By the way, everyone starts from a different shrine, and merging is also prohibited. Then Chieri and Kanako should follow the initial position."

Chieri "Uh ..."

Kanako "Oh, it's okay if you bring some sweets!"

Chieri "I'll do my best ..."

Akane "Producer! What should I do!"

P "You are lively"

Akane "Eh"

P "Sit down"

madder""


Constraints

* 2 ≤ n ≤ 105
* 1 ≤ ai, bi, u, v ≤ n
* u ≠ v
* ai <bi
* (ai, bi) ≠ (aj, bj) (i ≠ j)

Input

The input is given in the following format.


n u v
a1 b1
a2 b2
...
an−1 bn−1


The first line is given three integers n, u, v separated by blanks.
From the 2nd line to the nth line, two integers ai and bi are given, separated by blanks.

Output

Output "Yes" if the rule can be satisfied, and "No" if it cannot be satisfied on one line.

Examples

Input

4 1 4
1 2
2 3
3 4


Output

Yes


Input

8 3 6
1 2
2 4
3 4
4 5
5 6
6 7
7 8


Output

No


Input

4 2 3
1 2
2 3
3 4


Output

Yes


Input

6 1 5
1 2
1 4
2 3
4 5
3 6


Output

No
#include <iostream>
#include <vector>
using namespace std;

typedef pair<int, int> i_i;

int N;
i_i pp;

void dfs(int u, int p, vector<vector<int> >& G, vector<int>& num) {
	num[u] = 1;
	for (int i = 0; i < G[u].size(); i++) {
		int v = G[u][i];
		if (v == p) continue;
		dfs(v, u, G, num);
		num[u] += num[v];
		if (num[v] == N / 2)
			pp = i_i(u, v);
	}
}

struct union_find {
	vector<int> v;
	union_find(int n) : v(n, -1) {}
	int find(int x) { return (v[x] < 0) ? x : (v[x] = find(v[x])); }
	void unite(int x, int y) {
		x = find(x); y = find(y);
		if (x != y) {
			if (-v[x] < -v[y]) swap(x, y);
			v[x] += v[y]; v[y] = x;
		}
	}
	bool same(int x, int y) { return find(x) == find(y); }
	int size(int x) { return -v[find(x)]; }
};

int main() {
	int x, y; cin >> N >> x >> y;
	x--; y--;
	if (N == 2) {
		cout << "Yes" << endl;
		return 0;
	}
	if (N % 2 == 1) {
		cout << "No" << endl;
		return 0;
	}
	vector<vector<int> > G(N);
	vector<int> d(N), A, B;
	for (int i = 0; i < N - 1; i++) {
		int a, b; scanf("%d%d", &a, &b);
		a--; b--;
		G[a].push_back(b);
		G[b].push_back(a);
		d[a]++; d[b]++;
		A.push_back(a);
		B.push_back(b);
	}
	vector<int> num(N);
	dfs(0, -1, G, num);
	union_find uf(N);
	for (int i = 0; i < N - 1; i++) {
		int a = A[i], b = B[i];
		if (i_i(a, b) == pp || i_i(b, a) == pp) {
			d[a]--; d[b]--;
		}
		else uf.unite(a, b);
	}
	for (int u = 0; u < N; u++)
		if (d[u] >= 3) {
			cout << "No" << endl;
			return 0;
		}
	if (uf.same(x, y)) {
		cout << "No" << endl;
		return 0;
	}
	if (d[x] == 1 && d[y] == 1) {
		cout << "Yes" << endl;
		return 0;
	}
	cout << "No" << endl;
}