#include <bits/stdc++.h>
typedef struct camellos {
  int x;
  int d;
} Camellos;
int n, i;
int main() {
  scanf("%d", &n);
  Camellos spit[n];
  for (i = 0; i < n; i++) {
    if (i == n) {
      scanf("%d ", &(spit[i].x));
      scanf("%d", &(spit[i].d));
    } else {
      scanf("%d ", &(spit[i].x));
      scanf("%d", &(spit[i].d));
    }
  }
  int j = 0;
  int a = 0;
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      if ((spit[i].x + spit[i].d == spit[j].x) &&
          (spit[j].x + spit[j].d == spit[i].x)) {
        a = 1;
        break;
      }
    }
  }
  if (a == 1) {
    printf("YES");
  } else {
    printf("NO");
  }
  return 0;
}
