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