#include <bits/stdc++.h>
using namespace std;
vector<string> pril, sush, glag;
void Init() {
  pril.push_back("lios");
  pril.push_back("liala");
  sush.push_back("etr");
  sush.push_back("etra");
  glag.push_back("initis");
  glag.push_back("inites");
}
pair<int, bool> Check(string str) {
  pair<int, bool> res;
  for (int i = 0; i < 2; i++) {
    if (str.length() >= pril[i].length() &&
        str.substr(str.length() - pril[i].length(), pril[i].length()) ==
            pril[i])
      return make_pair(0, i);
  }
  for (int i = 0; i < 2; i++) {
    if (str.length() >= sush[i].length() &&
        str.substr(str.length() - sush[i].length(), sush[i].length()) ==
            sush[i])
      return make_pair(1, i);
  }
  for (int i = 0; i < 2; i++) {
    if (str.length() >= glag[i].length() &&
        str.substr(str.length() - glag[i].length(), glag[i].length()) ==
            glag[i])
      return make_pair(2, i);
  }
  return make_pair(-1, 0);
}
int main() {
  Init();
  int f[3];
  for (int i = 0; i < 3; i++) f[i] = 0;
  char s;
  string str;
  bool inStr = false, sol = true;
  int type = -1;
  int step = -1;
  int res = 0;
  bool pol = false;
  while ((s = getchar()) != EOF) {
    if (s >= 'a' && s <= 'z') {
      if (!inStr) inStr = true;
      str.push_back(s);
    } else if (inStr) {
      inStr = false;
      pair<int, bool> r = Check(str);
      if (r.first == -1) {
        sol = false;
        break;
      }
      if (type == -1) {
        type = r.first;
        pol = r.second;
        f[type]++;
      } else {
        if (pol != r.second)
          sol = false;
        else if (type + 1 == r.first) {
          type = r.first;
          f[type]++;
        } else if (type == r.first) {
          if (type == 1) sol = false;
          f[type]++;
        } else
          sol = false;
        if (!sol) break;
      }
      str.clear();
    }
  }
  if (!sol)
    printf("NO");
  else {
    if (inStr) {
      inStr = false;
      pair<int, bool> r = Check(str);
      if (r.first == -1) {
        sol = false;
      }
      if (type == -1) {
        type = r.first;
        pol = r.second;
        f[type]++;
      } else {
        if (pol != r.second)
          sol = false;
        else if (type + 1 == r.first) {
          type = r.first;
          f[type]++;
        } else if (type == r.first) {
          if (type == 1) sol = false;
          f[type]++;
        } else
          sol = false;
      }
      str.clear();
    }
    int sum = 0;
    for (int i = 0; i < 3; i++) sum += f[i];
    if (sum == 1)
      printf("YES");
    else {
      if (sum == f[0] || sum == f[1] || sum == f[2])
        printf("NO");
      else
        printf("YES");
    }
  }
  return 0;
}
