#include <bits/stdc++.h>
using namespace std;
bool isprime(long long int n) {
  if (n == 1) return true;
  if (n == 2 || n == 3) return true;
  if (n % 2 == 0) return false;
  for (long long int i = 3; i * i <= n; i += 2) {
    if (n % i == 0) return false;
  }
  return true;
}
long long int gcd1(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd1(b % a, a);
}
int countDigit(long long n) {
  int count = 0;
  while (n != 0) {
    n = n / 10;
    ++count;
  }
  return count;
}
long long int sumOfDigits(long long int x) {
  long long int sum = 0;
  while (x != 0) {
    sum += x % 10;
    x = x / 10;
  }
  return sum;
}
long long int lastDigit(long long int x) {
  long long int sum = 0;
  sum = sum + (x % 10);
  return sum;
}
long long int factorial(long long int n) {
  if (n == 0) return 1;
  long long int i = n, fact = 1;
  while (n / i != n) {
    fact = fact * i;
    i--;
  }
  return fact;
}
bool isPerfectSquare(long double x) {
  if (x >= 0) {
    long long sr = sqrt(x);
    return (sr * sr == x);
  }
  return false;
}
long long int findGCD(long long int arr[], long long int n) {
  long long int result = arr[0];
  for (long long int i = 1; i < n; i++) {
    result = gcd1(arr[i], result);
    if (result == 1) return 1;
  }
  return result;
}
bool checkpalindrome(long long int c) {
  string p = to_string(c);
  int j = p.size() - 1;
  for (int i = 0; i < j; i++, j--) {
    if (p[i] != p[j]) return false;
  }
  return true;
}
bool isPowerOfTwo(int n) {
  if (n == 0) return false;
  return (ceil(log2(n)) == floor(log2(n)));
}
void solve() {
  int n, flag = 0;
  cin >> n;
  int a[n], b[n];
  for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      if ((a[i] + b[i] == a[j]) && (a[j] + b[j] == a[i])) {
        cout << "YES" << endl;
        flag = 1;
        break;
      }
    }
    if (flag == 1) break;
  }
  if (flag == 0) cout << "NO" << endl;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int test_case = 1;
  while (test_case--) {
    solve();
  }
  return 0;
}
