#include <iostream>
using namespace std;
int main()
{
int n; cin >> n;
int arr1[n] , arr2[n] , ezafe[300];
int i = 0;
while ( i < 300 )
{
ezafe[i] = 0;
i ++;
}
for ( int i = 0 ; i < n ; i ++ )
{
cin >> arr1[i] >> arr2[i];
if ( arr1[i] <= 299 )
{
ezafe[arr1[i]] ++;
}
if ( arr2[i] <= 299 )
{
ezafe[arr2[i]] ++;
}
}
int counter = 0;
for ( int i = 0 ; i < n ; i ++ )
{
if ( ezafe[arr1[i]] == 2 )
{
counter ++;
}
if ( i == n - 1 )
{
if ( counter == n )
{
cout << "Yes";
}
else
{
cout << "No";
}
}
}
return 0;
}