#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int flag = 0;
  int x[n], d[n];
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> d[i];
    d[i] = d[i] + x[i];
  }
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if (x[i] == d[j] && x[j] == d[i]) {
        flag = 1;
        break;
      }
    }
  }
  if (flag == 1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
