#include <bits/stdc++.h>
using namespace std;
int n, m, q;
int ans, sum, tmp;
int MAX, MIN;
char a[100100], w[10][15];
int b[100100], nb = 0, l[10];
int chk(int i, int j, int k) {
  for (k; k >= 0; k--, i--) {
    if (a[i] != w[j][k]) return 0;
  }
  return 1;
}
int main() {
  gets(a);
  scanf(" ");
  strcpy(w[0], "lios"), l[0] = strlen(w[0]);
  strcpy(w[1], "etr"), l[1] = strlen(w[1]);
  strcpy(w[2], "initis"), l[2] = strlen(w[2]);
  strcpy(w[3], "liala"), l[3] = strlen(w[3]);
  strcpy(w[4], "etra"), l[4] = strlen(w[4]);
  strcpy(w[5], "inites"), l[5] = strlen(w[5]);
  int L = strlen(a);
  for (int i = 0; i < L; i++)
    if (a[i + 1] == ' ' || a[i + 1] == '\0') {
      int j;
      for (j = 0; j < 6; j++)
        if (chk(i, j, l[j] - 1)) break;
      b[nb++] = j;
    }
  int chk = 0, num[10] = {0};
  for (int i = 0; i < nb; i++) {
    if (b[i] == 6) chk = 1;
    num[b[i]]++;
  }
  if (!chk && num[0] + num[1] + num[2] + num[3] + num[4] + num[5] == 1) {
    printf("YES");
    return 0;
  }
  if ((num[0] + num[1] + num[2] != 0) && (num[3] + num[4] + num[5] != 0))
    chk = 1;
  if ((num[3] + num[4] + num[5] == 0) && (num[1] != 1)) chk = 1;
  if ((num[0] + num[1] + num[2] == 0) && (num[4] != 1)) chk = 1;
  for (int i = 0; i < nb - 1; i++)
    if (b[i] > b[i + 1]) chk = 1;
  if (chk)
    printf("NO");
  else
    printf("YES");
}
