#include <bits/stdc++.h>
using namespace std;
const int N = 1e4;
int n, arr[100000], a, b;
int main(int argc, char** argv) {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &a, &b);
    arr[a + N] = b;
  }
  for (int i = 0; i < 100000; i++) {
    if (arr[i]) {
      if (arr[arr[i] + i] + arr[i] + i == i) {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
