#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; vector> V(N); map mp; for (auto &[a, b] : V) { cin >> a >> b; mp[a]++; mp[b]++; } for (auto [a, b] : V) { if (mp[a] != 1 && mp[b] != 1) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0; }