#include <bits/stdc++.h>
using namespace std;
void s(int y) {
  static bool f = 0;
  static int i = 0, A[200];
  if (y == 0) {
    if (f) cout << "YES" << endl;
    if (!f) cout << "NO" << endl;
    return;
  }
  cin >> A[i++];
  cin >> A[i];
  A[i] += A[i - 1];
  if (!f) {
    for (int s = 0; s < i - 1; s += 2)
      if (A[i] == A[s] && A[i - 1] == A[s + 1]) f = 1;
  }
  i++;
  s(y - 1);
}
int main() {
  int a;
  cin >> a;
  s(a);
  return 0;
}
