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