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