#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int inf = 2e9 + 5;
double PI = 3.14159265358979323846;
map<int, int> pos;
void solve() {
  int n;
  cin >> n;
  vector<pair<int, int> > v;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    v.push_back({a, b});
    pos[a] = b;
  }
  for (auto p : v) {
    int frst = p.first;
    int spit = p.second + p.first;
    if (spit >= -10000 and spit <= 10000) {
      if (pos[spit] + spit == frst) {
        cout << "YES"
             << "\n";
        return;
      }
    }
  }
  cout << "NO"
       << "\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T;
  T = 1;
  while (T--) {
    solve();
  }
}
