#include <bits/stdc++.h>
using namespace std;
int x[128], xx[128];
int main() {
  int n;
  cin >> n;
  int d;
  for (int i = 0; i < n; i++) {
    cin >> x[i] >> d;
    xx[i] = x[i] + d;
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      if (x[i] == xx[j] && x[j] == xx[i]) {
        puts("YES");
        return 0;
      }
    }
  puts("NO");
  return 0;
}
