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