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