#include <bits/stdc++.h>
using namespace std;
int main() {
  int nc, x, d;
  scanf("%d\n", &nc);
  vector<pair<int, int> > v;
  while (nc--) {
    scanf("%d", &x);
    scanf("%d\n", &d);
    v.push_back(make_pair(x, x + d));
  }
  bool goal = 0;
  for (int i = 0; i < v.size() && !goal; i++) {
    for (int j = i + 1; j < v.size() && !goal; j++) {
      if (v[i].first == v[j].second && v[i].second == v[j].first) {
        goal = 1;
      }
    }
  }
  if (goal)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
