#include <bits/stdc++.h>
const int N = 100100;
char buf[N];
struct Node {
  std::string s;
  int id, which;
} p[N];
char B[][7] = {"lios", "etr", "initis", "liala", "etra", "inites"};
int check(char buf[N]) {
  int n = strlen(buf);
  for (int i = 0; i < 6; i++) {
    bool ok = true;
    int l = strlen(B[i]);
    for (int j = n - l, k = 0; j < n && j >= 0; j++, k++) {
      if (B[i][k] != buf[j]) ok = false;
    }
    if (ok && l <= n) return i;
  }
  return -1;
}
void check(bool f) {
  if (f) {
    puts("NO");
    exit(0);
  }
}
int main() {
  int n = 0;
  bool can = true;
  while (~scanf("%s", buf)) {
    p[n].s = buf;
    p[n].id = n;
    p[n].which = check(buf);
    if (p[n].which == -1) can = false;
    n++;
  }
  check(!can);
  int which = p[0].which / 3;
  for (int i = 0; i < n; i++) {
    if (which != p[i].which / 3) can = false;
  }
  check(!can);
  for (int i = 1; i < n; i++) {
    if (p[i].which < p[i - 1].which) can = false;
  }
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (p[i].which == 1 || p[i].which == 4) cnt++;
  }
  if (n > 1 && cnt != 1) can = false;
  check(!can);
  puts("YES");
  return 0;
}
