#include <bits/stdc++.h>
using namespace std;
struct my_struct {
  int value = 1000000007;
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  unordered_map<int, my_struct> hash;
  int N = n;
  while (N--) {
    long long a, b;
    cin >> a >> b;
    my_struct aa;
    aa.value = a + b;
    hash[a] = aa;
    if (hash[a + b].value == a) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
