#include <bits/stdc++.h>
int a[100005];
int main() {
  int n, i, x, d, flag = 0;
  for (i = 0; i <= 60000; i++) a[i] = 10000000;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d%d", &x, &d);
    a[30000 + x] = x + d;
    if (a[30000 + x + d] == x) flag = 1;
  }
  if (flag)
    puts("YES");
  else
    puts("NO");
}
