#include <bits/stdc++.h>
using namespace std;
inline int getint() {
  int f = 1, x = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
inline long long getll() {
  long long f = 1, x = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
int n, x[107], d[107];
map<int, int> k1, k2;
int main() {
  n = getint();
  for (int(i) = (1); (i) <= (n); ++(i)) {
    x[i] = getint(), d[i] = getint();
    k1[x[i]] = k2[x[i] + d[i]] = i;
    if (k1[x[i] + d[i]] && k2[x[i]] && k1[x[i] + d[i]] == k2[x[i]])
      return printf("YES"), 0;
  }
  return printf("NO"), 0;
}
