#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x[n], d, t[n];
  for (int i = 0; i < n; ++i) {
    cin >> x[i] >> d;
    t[i] = x[i] + d;
  }
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      if (x[i] == t[j] && x[j] == t[i]) {
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
