#include <bits/stdc++.h>
int main() {
  int n, x[110], y[110], i, j, k, l, max = 0, x1, x2;
  scanf("%i", &n);
  for (i = 0; i < n; i++) {
    scanf("%i%i", &x[i], &y[i]);
  }
  for (i = 0; i < n - 1; i++) {
    x1 = x[i] + y[i];
    for (j = i + 1; j < n; j++) {
      if (x[j] == x1 && x[j] + y[j] == x[i]) {
        printf("YES");
        return 0;
      }
    }
  }
  printf("NO");
  return 0;
}
