#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  map<int, vector<int> > mp;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    mp[a].push_back(a + b);
  }
  long long flag = 0;
  for (auto k : mp) {
    for (int i = 0; i < (int)k.second.size(); i++) {
      if (mp.find(k.second[i]) != mp.end()) {
        if (find(mp[k.second[i]].begin(), mp[k.second[i]].end(), k.first) !=
            mp[k.second[i]].end())
          flag = -1;
      }
    }
    if (flag == -1) break;
  }
  if (flag == -1)
    cout << "YES";
  else
    cout << "NO";
}
