#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int n, x[101], y[101], d, i, j;
  bool ok;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &x[i], &d);
    y[i] = x[i] + d;
  }
  ok = false;
  for (i = 0; i < n - 1 && !ok; i++) {
    for (j = i + 1; j < n && !ok; j++) {
      if (x[i] == y[j] && x[j] == y[i]) ok = true;
    }
  }
  if (ok)
    printf("YES\n");
  else
    printf("NO\n");
  return EXIT_SUCCESS;
}
