#include <bits/stdc++.h>
using namespace std;
int a[60010];
int main() {
  int n, i, l, k, flag;
  memset(a, 0, sizeof(a));
  flag = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &l, &k);
    l = l + 30000;
    int temp = l + k;
    a[l] = temp;
    if (a[temp] == l) flag = 1;
  }
  if (flag) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
}
