#include <bits/stdc++.h>
using namespace std;
map<long long, long long> m;
long long a[20010], b[200010];
int main() {
  long long n, i, j, k, c = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    m[a[i] + b[i]] = a[i];
    if (m[a[i]] == a[i] + b[i]) c = 1;
  }
  if (c)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
