#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c = 0, a;
  cin >> n;
  vector<vector<int> > xd;
  for (int i = 0; i < n; i++) {
    vector<int> s;
    for (int j = 0; j < 2; j++) {
      cin >> a;
      s.push_back(a);
    }
    xd.push_back(s);
  }
  a = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if (xd[i][0] + xd[i][1] == xd[j][0] && xd[j][0] + xd[j][1] == xd[i][0]) {
        cout << "YES" << endl;
        a = 1;
        break;
      }
      c++;
    }
    if (a == 1) break;
  }
  if (c == n * (n - 1) / 2) cout << "NO" << endl;
  return 0;
}
