#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int p, d;
  vector<int> P;
  vector<int> D;
  for (int i = 0; i < n; i++) {
    cin >> p >> d;
    P.push_back(p);
    D.push_back(d);
  }
  for (int i = 0; i < n; i++) {
    for (int ii = i + 1; ii < n; ii++)
      if (P[i] + D[i] == P[ii] && P[ii] + D[ii] == P[i]) {
        cout << "YES";
        return 0;
      }
  }
  cout << "NO";
  return 0;
}
