#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const double PI = acos(-1);
const double EPS = 1e-8;
int main() {
  int n;
  cin >> n;
  int x[n], d[n];
  for (int i = 0; i < (int)(n); ++i) cin >> x[i] >> d[i];
  for (int i = 0; i < (int)(n); ++i)
    for (int j = 0; j < (int)(i); ++j) {
      if (x[i] + d[i] == x[j] && x[j] + d[j] == x[i]) {
        cout << "YES" << endl;
        return 0;
      }
    }
  cout << "NO" << endl;
}
