#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  pair<long long, long long> arr[100];
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> arr[i].first >> arr[i].second;
  for (long long i = 0; i < n; i++)
    for (long long j = i + 1; j < n; j++)
      if (arr[i].first + arr[i].second == arr[j].first &&
          arr[j].first + arr[j].second == arr[i].first)
        return cout << "YES\n", 0;
  cout << "NO\n";
  return 0;
}
