#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<string> name;
  map<string, pair<int, int> > rating;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string c;
    cin >> c;
    name.push_back(c);
    int b, a;
    cin >> b >> a;
    rating[c] = make_pair(b, a);
  }
  for (int i = 0; i < n; i++) {
    if (rating[name[i]].first >= 2400 &&
        rating[name[i]].second > rating[name[i]].first) {
      puts("YES");
      return 0;
    }
  }
  puts("NO");
  return 0;
}
