#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int n;
  cin >> n;
  int a = 0;
  long int arr[101][2];
  for (int i = 0; i < n; i++) {
    cin >> arr[i][0];
    cin >> arr[i][1];
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if (arr[i][0] + arr[i][1] == arr[j][0] &&
          (arr[j][0] + arr[j][1]) == arr[i][0]) {
        a = 1;
        break;
      }
    }
    if (a == 1) {
      cout << "YES";
      break;
    }
  }
  if (a == 0) cout << "NO";
}
