#include <bits/stdc++.h>
using namespace std;
char x[1000000];
char strs[6][7] = {"lios", "liala", "etr", "etra", "initis", "inites"};
int lens[6] = {4, 5, 3, 4, 6, 6};
pair<int, int> data[1000000];
int reach = 0;
pair<int, int> matchS(int p) {
  for (int i = 0; i < 6; i++) {
    int cur = p;
    bool can = 1;
    for (int j = lens[i] - 1; j >= 0; j--, cur--) {
      if (x[cur] != strs[i][j]) {
        can = 0;
        break;
      }
    }
    if (can) return make_pair(i / 2, i & 1);
  }
  return make_pair(-1, -1);
}
int main() {
  cin.getline(x, 1000000);
  x[strlen(x)] = ' ';
  int len = strlen(x);
  for (int i = 0; i < len; i++) {
    if (i != len && x[i] != ' ') continue;
    data[reach++] = matchS(i - 1);
    if (data[reach - 1].first < 0) {
      printf("NO\n");
      return 0;
    }
  }
  if (reach == 1) {
    printf("YES\n");
    return 0;
  }
  int curGen = data[0].second;
  for (int i = 1; i < reach; i++) {
    if (data[i].second != curGen) {
      printf("NO\n");
      return 0;
    }
  }
  int pnt = -1;
  for (int i = 0; i < reach; i++) {
    if (data[i].first == 2) {
      printf("NO\n");
      return 0;
    }
    if (data[i].first == 1) {
      pnt = i + 1;
      break;
    }
  }
  if (pnt == -1) {
    printf("NO\n");
    return 0;
  }
  for (int i = max(pnt, 1); i < reach; i++) {
    if (data[i].first == 1 || data[i].first == 0) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
