#include <bits/stdc++.h>
using namespace std;
long n, x[2000], y[2000], fl;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++)
      if (x[i] + y[i] == x[j] && x[j] + y[j] == x[i]) fl = 1;
  if (fl)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  cin.get();
  cin.get();
  return 0;
}
