#include <bits/stdc++.h>
using namespace std;
const int maxn = 10100;
int main() {
  int n;
  cin >> n;
  pair<int, int> p[maxn];
  for (int i = 0; i < n; i++) {
    cin >> p[i].first;
    cin >> p[i].second;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 1; j < n; j++) {
      if (p[i].first + p[i].second == p[j].first &&
          p[j].first + p[j].second == p[i].first) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
