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