#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  pair<int, int> p[n];
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    p[i] = {a, a + b};
  }
  bool flag = false;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i != j) {
        if (p[i].first == p[j].second && p[i].second == p[j].first) {
          flag = true;
          i = n;
          j = n;
        }
      }
    }
  }
  if (flag == true) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
