#include <bits/stdc++.h>
using namespace std;
set<pair<long long, long long> > s;
signed main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; ++i) {
    long long a, b;
    cin >> a >> b;
    b = a + b;
    if (a > b) swap(a, b);
    if (s.find({a, b}) != s.end()) return cout << "YES\n", 0;
    s.insert({a, b});
  }
  cout << "NO\n";
}
