#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
char s[N];
int gen[2], word[3];
char ss[][20] = {"lios", "liala", "etr", "etra", "initis", "inites"};
int gentmp, wordf;
int ff;
int check(char *s) {
  int len = strlen(s);
  if (len >= 4 && strcmp(s + len - 4, ss[0]) == 0) {
    gentmp = 0;
    wordf = 0;
    return 1;
  }
  if (len >= 5 && strcmp(s + len - 5, ss[1]) == 0) {
    gentmp = 1;
    wordf = 0;
    return 1;
  }
  if (len >= 3 && strcmp(s + len - 3, ss[2]) == 0) {
    gentmp = 0;
    wordf = 1;
    return 1;
  }
  if (len >= 4 && strcmp(s + len - 4, ss[3]) == 0) {
    gentmp = 1;
    wordf = 1;
    return 1;
  }
  if (len >= 6 && strcmp(s + len - 6, ss[4]) == 0) {
    gentmp = 0;
    wordf = 2;
    return 1;
  }
  if (len >= 6 && strcmp(s + len - 6, ss[5]) == 0) {
    gentmp = 1;
    wordf = 2;
    return 1;
  }
  return 0;
}
int main() {
  gen[0] = gen[1] = 1;
  word[0] = 1;
  word[1] = 1;
  word[2] = 1;
  int cnt = 0;
  while (scanf("%s", s) >= 0) {
    cnt++;
    if (!check(s)) {
      printf("NO\n");
      return 0;
    }
    if (gen[gentmp] && word[wordf]) {
      gen[1 - gentmp] = 0;
      if (wordf == 1) {
        ff = 1;
        word[0] = word[1] = 0;
        word[2] = 1;
      }
      if (wordf == 2) {
        word[0] = word[1] = 0;
        word[2] = 1;
      }
    } else {
      printf("NO\n");
      return 0;
    }
  }
  if (ff || cnt == 1)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
