#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x[n];
  int d[n];
  int negative[n];
  int k = 0;
  for (int i = 0; i < n; i++) {
    cin >> x[i];
    cin >> d[i];
    if (d[i] < 0) {
      negative[k++] = i;
    }
  }
  int present = 0;
  for (int i = 0; i < k; i++) {
    for (int j = 0; j < n; j++) {
      if (d[j] == -1 * d[negative[i]]) {
        if ((x[negative[i]] - x[j]) == d[j]) {
          present = 1;
          cout << "YES";
          break;
        }
      }
    }
    if (present == 1) {
      break;
    }
  }
  if (present == 0) {
    cout << "NO";
  }
  return 0;
}
