#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); int n; cin >> n; vector> v(n); for (auto& [a, b] : v) cin >> a >> b; map st; for (auto& [a, b] : v) st[a]++, st[b]++; bool ok = true; for (auto& [a, b] : v) ok &= st[a] == 1 || st[b] == 1; cout << (ok ? "Yes" : "No") << '\n'; return 0; }