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