#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[101], b[101], c[101];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    c[i] = a[i] + b[i];
  }
  bool check = false;
  for (int i = 0; i < n; i++) {
    for (int j = i; j < n; j++) {
      if ((c[i] == a[j]) && c[j] == a[i]) {
        check = true;
        break;
      }
    }
  }
  if (check == true)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
