#include <bits/stdc++.h>
using namespace std;
string ss[3][2] = {{"lios", "liala"}, {"etr", "etra"}, {"initis", "inites"}};
char a[100010];
int b[3];
int n;
int rod;
string s;
inline bool isEq(int p, string t) {
  for (int i = 0; i < t.size(); ++i)
    if (s[p + i] != t[i]) return 0;
  return 1;
}
inline int getWord() {
  n = s.size();
  for (int i = 0; i < 3; ++i)
    for (int j = 0; j < 2; ++j) {
      if ((int)n - (int)ss[i][j].size() >= 0 &&
          s.substr((int)n - (int)ss[i][j].size()) == ss[i][j]) {
        if (rod == -1) rod = j;
        if (rod != j) return -1;
        return i;
      }
    }
  return -1;
}
int main() {
  bool ok = 1;
  b[0] = b[1] = b[2] = 0;
  rod = -1;
  int kol = 0;
  while (scanf("%s", a) == 1 && ok) {
    s = a;
    ++kol;
    assert(1 <= s.size() && s.size() <= 100010);
    int t = getWord();
    if (t == -1) {
      ok = 0;
      break;
    }
    for (int i = t + 1; i < 3 && ok; ++i)
      if (b[i] > 0) ok = 0;
    assert(0 <= t && t <= 2);
    ++b[t];
  }
  printf((kol == 1 || b[1] == 1) && ok ? "YES\n" : "NO\n");
  return 0;
}
