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