#include <bits/stdc++.h>
using namespace std;
int i, j;
bool f = 0;
int main() {
  int n;
  scanf("%d", &n);
  int a[n], b[n];
  for (i = 0; i < n; ++i) scanf("%d %d", a + i, b + i);
  for (i = 0; i < n; ++i) {
    for (j = 0; j < n; ++j) {
      if (a[i] + b[i] == a[j] && (a[j] + b[j] == a[i])) {
        printf("YES\n");
        return 0;
      }
    }
  }
  printf("NO\n");
}
