#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<vector<int>> z;
  z.resize(100);
  int x, y;
  for (int i = 0; i < n; ++i) {
    cin >> x >> y;
    z[i].push_back(x);
    z[i].push_back(x + y);
  }
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j)
      if (z[i][0] == z[j][1] && z[j][0] == z[i][1] && i != j) {
        cout << "YES";
        return 0;
      }
  cout << "NO";
  return 0;
}
