#include <bits/stdc++.h>
int main() {
  int n, a[100], b[100], j, i;
  scanf("%d", &(n));
  for (i = 0; i < n; i++) scanf("%d", &(a[i])), scanf("%d", &(b[i]));
  for (i = 0; i < n - 1; i++)
    for (j = i + 1; j < n; j++) {
      if (a[i] + b[i] == a[j] && a[i] == a[j] + b[j]) {
        printf("YES");
        printf("\n");
        return 0;
      }
    }
  printf("NO");
  printf("\n");
  return 0;
}
