#include <bits/stdc++.h>
using namespace std;
map<int, int> M;
int N, C[1000], D[1000], t1, t2;
bool ans = 0;
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; ++i) {
    scanf("%d %d", &C[i], &D[i]);
    M[C[i]] = i;
  }
  for (int i = 0; i < N; ++i) {
    t1 = C[i] + D[i];
    if (M.find(t1) != M.end()) {
      t2 = t1 + D[M[t1]];
      if (t2 == C[i]) {
        ans = 1;
        break;
      }
    }
  }
  if (ans)
    printf("YES\n");
  else
    printf("NO\n");
}
