#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long T = 1;
  while (T--) {
    long long n;
    cin >> n;
    vector<long long> x(n), y(n);
    for (long long i = 0; i < n; i++) {
      cin >> x[i] >> y[i];
    }
    bool flag = 0;
    for (long long i = 0; i < n - 1; i++) {
      for (long long j = i + 1; j < n; j++) {
        if (x[j] + y[j] == x[i] && x[i] + y[i] == x[j]) flag = 1;
      }
    }
    if (flag == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
