#include <bits/stdc++.h>
const int ML = 100005;
int x[ML], d[ML], n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &d[i]);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++)
      if (i != j)
        if (x[i] + d[i] == x[j] && x[j] + d[j] == x[i]) {
          printf("YES");
          return 0;
        }
  printf("NO");
  return 0;
}
