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