#include <bits/stdc++.h>
using namespace std;
string sex[6] = {"lios", "etr", "initis", "liala", "etra", "inites"};
string str[100005];
int n, ns[100005], isv[100005];
int main() {
  int i, j;
  n = 0;
  while (cin >> str[n]) {
    n++;
  }
  int alen, blen;
  for (i = 0; i < n; i++) {
    alen = str[i].size();
    for (j = 0; j < 6; j++) {
      blen = sex[j].size();
      if (alen >= blen) {
        int index = str[i].find(sex[j], alen - blen);
        if (index == alen - blen) {
          if (j < 3)
            ns[i] = 0;
          else
            ns[i] = 1;
          isv[i] = j % 3;
          break;
        }
      }
    }
    if (j == 6) break;
  }
  if (i < n)
    printf("NO\n");
  else {
    for (i = 0; i < n; i++) {
      if (ns[i] != ns[0]) break;
    }
    if (i < n)
      printf("NO\n");
    else {
      if (n == 1)
        printf("YES\n");
      else {
        int num[3], st = 0;
        memset(num, 0, sizeof(num));
        for (i = 0; i < n; i++) {
          if (isv[i] >= st) {
            st = isv[i];
            num[st]++;
          } else {
            break;
          }
        }
        if (i < n)
          printf("NO\n");
        else {
          if (num[1] == 1)
            printf("YES\n");
          else
            printf("NO\n");
        }
      }
    }
  }
  return 0;
}
