#include <bits/stdc++.h>
using namespace std;
enum type_t { ADJ, NOUN, VERB, ERR };
enum gender_t { MALE, FEMALE };
struct word_t {
  type_t type;
  gender_t gender;
};
const int L = 100000 + 10;
char buf[L];
int ends_with(const char *s, const char *t) {
  int n = strlen(s);
  int m = strlen(t);
  if (n < m) return 0;
  return !strcmp(s + n - m, t);
}
int input(word_t *w) {
  if (scanf("%s", buf) == EOF) return 0;
  w->type = ERR;
  if (ends_with(buf, "lios")) w->type = ADJ, w->gender = MALE;
  if (ends_with(buf, "liala")) w->type = ADJ, w->gender = FEMALE;
  if (ends_with(buf, "etr")) w->type = NOUN, w->gender = MALE;
  if (ends_with(buf, "etra")) w->type = NOUN, w->gender = FEMALE;
  if (ends_with(buf, "initis")) w->type = VERB, w->gender = MALE;
  if (ends_with(buf, "inites")) w->type = VERB, w->gender = FEMALE;
  return 1;
}
int n;
word_t word[L];
int check(word_t *word, int n) {
  for (int i = 0; i < n; i++)
    if (word[i].type == ERR) return 0;
  if (n == 1) return 1;
  for (int i = 1; i < n; i++)
    if (word[i].gender != word[i - 1].gender) return 0;
  int i;
  for (i = 0; i < n; i++)
    if (word[i].type != ADJ) break;
  if (i >= n || word[i].type != NOUN) return 0;
  for (i++; i < n; i++)
    if (word[i].type != VERB) return 0;
  return 1;
}
int main() {
  n = 0;
  while (input(&word[n])) n++;
  puts(check(word, n) ? "YES" : "NO");
  return 0;
}
