#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<pair<int, int>> v;
int main() {
  ios_base::sync_with_stdio(0), ios::sync_with_stdio(0), cin.tie(0),
      cout.tie(0);
  ;
  int n, x, d;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> x >> d;
    v.push_back({x, d});
  }
  for (int i = 0; i <= n - 1; ++i) {
    for (int j = 0; j <= n - 1; ++j) {
      if (i == j) continue;
      if (v[j].first + v[j].second == v[i].first &&
          v[i].first + v[i].second == v[j].first)
        return cout << "YES"
                    << "\n",
               0;
    }
  }
  return cout << "NO"
              << "\n",
         0;
  return 0;
}
