#include <bits/stdc++.h>
using namespace std;
int camelpo[10003];
int camelmo[10003];
int main() {
  int n;
  cin >> n;
  for (int t = 1; t <= n; t++) {
    cin >> camelpo[t];
    cin >> camelmo[t];
  }
  int flag = 0;
  for (int t = 1; t < n; t++) {
    for (int k = t + 1; k <= n; k++) {
      if (camelpo[t] + camelmo[t] == camelpo[k] &&
          camelpo[k] + camelmo[k] == camelpo[t]) {
        flag = 1;
      }
    }
  }
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
