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