#include <bits/stdc++.h>
using namespace std;
int a[500005];
int main() {
  int i, j, n, m, x, y, b, c, flag = 0, d, l, r;
  scanf("%d", &n);
  l = 500000;
  r = 0;
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &x, &d);
    x += 4 * 10000;
    l = min(l, x);
    r = max(r, x);
    a[x] = x + d;
  }
  for (i = l; i <= r; i++) {
    if (a[a[i]] == i) break;
  }
  if (i <= r)
    puts("YES");
  else
    puts("NO");
  return 0;
}
