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