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