#include <bits/stdc++.h>
using namespace std;
struct camel {
  int x, y;
};
int main() {
  int n;
  bool r = false;
  cin >> n;
  camel arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i].x >> arr[i].y;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++)
      if (arr[i].x + arr[i].y == arr[j].x)
        if (arr[j].x + arr[j].y == arr[i].x) r = true;
  }
  if (r)
    cout << "YES";
  else
    cout << "NO";
}
