#include <bits/stdc++.h>
using namespace std;
vector<string> gao;
int type[100000];
char buf[100000];
char data[6][100] = {"lios", "liala", "etr", "etra", "initis", "inites"};
int main() {
  int num = 0;
  while (scanf("%s", buf) != EOF) {
    int len = strlen(buf);
    bool gao = false;
    for (int i = 0; i < 6; i++) {
      if (len >= strlen(data[i]) &&
          !strcmp(data[i], buf + len - strlen(data[i]))) {
        type[num++] = i;
        gao = true;
      }
    }
    if (!gao) {
      puts("NO");
      return 0;
    }
  }
  if (num == 1) {
    puts("YES");
    return 0;
  }
  int app[3] = {};
  for (int i = 1; i < num; i++) {
    if (!(type[i] % 2 == type[i - 1] % 2 && type[i] >= type[i - 1])) {
      puts("NO");
      return 0;
    }
  }
  for (int i = 0; i < num; i++) {
    app[type[i] / 2]++;
  }
  if (app[1] == 1)
    puts("YES");
  else
    puts("NO");
}
