#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    map<int, int> m;
    int x, y;
    for (int i = 0; i < n; ++i) {
      cin >> x >> y;
      m[x] = x + y;
    }
    bool flag = 0;
    map<int, int>::iterator it;
    for (it = m.begin(); it != m.end(); ++it) {
      int x = it->first;
      if (m.count(m[x]) && m[m[x]] == x) {
        flag = 1;
        cout << "YES" << endl;
        break;
      }
    }
    if (!flag) cout << "NO" << endl;
  }
}
