#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, i, c = 0;
  cin >> t;
  for (i = 0; i < t; i++) {
    string s;
    int a, b;
    cin >> s >> a >> b;
    if (a >= 2400 && a <= 4000 && b >= 2400 && b <= 4000 && b > a) {
      c = 1;
    }
  }
  if (c == 1)
    cout << "YES";
  else
    cout << "NO";
}
