#include <bits/stdc++.h>
using namespace std;
int n, x, y;
map<pair<int, int>, bool> m;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    m[make_pair(x, x + y)] = true;
  }
  for (map<pair<int, int>, bool>::iterator it = m.begin(); it != m.end();
       it++) {
    bool c = it->second;
    if (c) {
      pair<int, int> p = it->first;
      swap(p.first, p.second);
      if (m[p]) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
