#include <bits/stdc++.h>
using namespace std;
char ss[100010];
char sb[100010];
int GetType(int tlen) {
  if (tlen >= 4 && strcmp(sb + tlen - 4, "lios") == 0) return 0;
  if (tlen >= 5 && strcmp(sb + tlen - 5, "liala") == 0) return 1;
  if (tlen >= 3 && strcmp(sb + tlen - 3, "etr") == 0) return 2;
  if (tlen >= 4 && strcmp(sb + tlen - 4, "etra") == 0) return 3;
  if (tlen >= 6 && strcmp(sb + tlen - 6, "initis") == 0) return 4;
  if (tlen >= 6 && strcmp(sb + tlen - 6, "inites") == 0) return 5;
  return -1;
}
bool Judge() {
  vector<int> v;
  int slen = strlen(ss);
  for (int pos = 0; pos < slen;) {
    sscanf(ss + pos, "%s", sb);
    int tlen = strlen(sb);
    int tp = GetType(tlen);
    if (tp == -1) return false;
    v.push_back(tp);
    pos += tlen + 1;
  }
  if (v.size() == 1) return true;
  int gender = v[0] & 1;
  int state = -1;
  for (int i = 0, _n(v.size()); i < _n; ++i) {
    int t = v[i];
    if ((t & 1) != gender) return false;
    int tp = t / 2;
    if (state <= 0) {
      if (tp == 2)
        return false;
      else
        state = tp;
    } else {
      if (tp != 2) return false;
      state = 2;
    }
  }
  if (state < 1) return false;
  return true;
}
int main() {
  while (gets(ss)) {
    if (Judge())
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
