#include <bits/stdc++.h>
int main() {
  long long N, i, start, finish;
  char name[11], c;
  scanf("%I64d", &N);
  for (i = 0; i < N; i++) {
    scanf("%c", &c);
    scanf("%s", name);
    scanf("%c", &c);
    scanf("%I64d", &start);
    scanf("%I64d", &finish);
    if (start < finish && start >= 2400) {
      N = -1;
      break;
    }
  }
  if (N == -1)
    printf("YES");
  else
    printf("NO");
}
