#include <bits/stdc++.h>
using namespace std;
const int MaxN = 100005;
map<string, pair<int, int> > M;
string tmp[] = {"lios", "etr", "initis", "liala", "etra", "inites"};
int main() {
  M["lios"] = pair<int, int>(1, 1);
  M["liala"] = pair<int, int>(2, 1);
  M["etr"] = pair<int, int>(1, 2);
  M["etra"] = pair<int, int>(2, 2);
  M["initis"] = pair<int, int>(1, 3);
  M["inites"] = pair<int, int>(2, 3);
  string text;
  getline(cin, text);
  int sz = text.length();
  if (sz == 0) {
    printf("NO\n");
    return 0;
  }
  vector<string> w;
  text += ' ';
  ++sz;
  bool ok = 1;
  for (int i = 0; i < sz && ok; ++i) {
    if (isspace(text[i])) {
      int j = 0, first = 0;
      string patt = "";
      while (++j <= 6 && i - j >= 0) {
        patt = text[i - j] + patt;
        if (M.find(patt) != M.end()) {
          first = 1;
          break;
        }
      }
      if (!first) {
        ok = 0;
        break;
      }
      w.push_back(patt);
    }
  }
  if (!ok) {
    printf("NO\n");
    return 0;
  }
  if (w.size() == 1) {
    printf("YES\n");
    return 0;
  }
  int gen = M[w[0]].first, occur = M[w[0]].second;
  if (occur == 3) ok = 0;
  string okay = "";
  for (int i = 0; i < w.size() && ok; ++i) {
    int j = i, cnt = 0;
    while (j < w.size() && occur == M[w[j]].second && ok) {
      ok = M[w[j]].first == gen, ++j, ++cnt;
    }
    if (!ok) break;
    if (occur == 2 && cnt > 1) ok = 0;
    okay += (char)(occur + '0');
    if (j == w.size()) break;
    occur = M[w[j]].second;
    i = j - 1;
  }
  int l = okay.length();
  if (l > 3) ok = 0;
  if (okay != "123" && okay != "2" && okay != "23" && okay != "12") ok = 0;
  if (ok)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
