#include <bits/stdc++.h>
using namespace std;
int a[20007];
int main() {
  ios_base::sync_with_stdio(0);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    map<int, int> mp;
    for (int i = 0; i < n; i++) {
      int x, y;
      cin >> x >> y;
      mp[x] = y;
      if (mp[x] == -1 * mp[x + y]) {
        cout << "YES";
        return 0;
      }
    }
    cout << "NO"
         << "\n";
  }
  return 0;
}
