#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y;
  vector<int> v1;
  vector<int> v2;
  map<int, int> mp;
  map<int, int>::iterator it;
  cin >> n;
  while (n--) {
    cin >> x >> y;
    v1.push_back(x);
    v2.push_back(y);
    mp[x] = y;
  }
  int sig = 0;
  for (int i = 0; i < v1.size(); i++) {
    if (mp[v1[i] + v2[i]]) {
      if (mp[v1[i] + v2[i]] + (v1[i] + v2[i]) == v1[i]) {
        sig = 1;
        cout << "YES" << endl;
        break;
      }
      if (sig == 1) break;
    }
  }
  if (sig == 0) cout << "NO" << endl;
}
