#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  map<long long int, long long int> m;
  if (n == 1) cout << "NO";
  for (long long int i = 0; i < n; i++) {
    long long int a, b;
    cin >> a >> b;
    m[a] = a + b;
  }
  long long int j = 1;
  for (auto i : m) {
    if (m[i.second] == i.first && (i.second != 0 || i.first != 0)) {
      cout << "YES";
      return 0;
    }
    j++;
  }
  cout << "NO";
}
