#include <bits/stdc++.h>
int n;
struct camel {
  int x, d;
  inline bool operator<(const camel& a) const { return x < a.x; }
} c[105];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d", &c[i].x, &c[i].d);
  std::sort(c, c + n);
  for (int i = 0; i < n; i++)
    for (int j = i; j < n; j++)
      if ((c[i].x + c[i].d == c[j].x) && (c[j].x + c[j].d == c[i].x)) {
        puts("YES");
        return 0;
      }
  puts("NO");
}
