#include #include using namespace std; using namespace atcoder; #define ll long long #define ld long double #define out(x) cout< inline bool chmin(T& a, T b) {if(a > b){a = b; return true;} else {return false;}}; template inline bool chmax(T& a, T b) {if(a < b){a = b; return true;} else {return false;}}; const ll INF=(1LL<<60); const ll mod=998244353; using Graph = vector>; using Network = vector>>; using Grid = vector; const vector dx = {0, 1, 0, -1}; const vector dy = {1, 0, -1, 0}; int main() { ll N;cin>>N; vector> A(1000, vector(1000, 0)); rep(i, N) { ll a, b;cin>>a>>b;a--, b--; A[a][b]++; } rep(i, 1000) { rep(j, 1000) { if (A[i][j] > 1) { out("Yes"); return 0; } } } out("No"); }