#include <bits/stdc++.h>
const int INF = 1000000009;
using namespace std;
string s;
int cont, p = -1;
string tostr(int k) {
  string s1 = "";
  int i;
  for (i = k; i < s.size(); i++) {
    if (isalpha(s[i]))
      s1 += s[i];
    else {
      cont = i;
      break;
    }
  }
  if (i == s.size()) cont = i;
  return s1;
}
int check(string s) {
  int f = s.rfind("lios") + 1;
  if (f && f + 3 == s.size()) return 1;
  f = s.rfind("etra") + 1;
  if (f && f + 3 == s.size()) return 5;
  f = s.rfind("etr") + 1;
  if (f && f + 2 == s.size()) return 2;
  f = s.rfind("initis") + 1;
  if (f && f + 5 == s.size()) return 3;
  f = s.rfind("liala") + 1;
  if (f && f + 4 == s.size()) return 4;
  f = s.rfind("inites") + 1;
  if (f && f + 5 == s.size()) return 6;
  return p;
}
int main() {
  string s1, s2 = "";
  int i, a[100005], t = 1, ch = 1, b[10] = {0}, tr = 1;
  a[0] = 0;
  getline(cin, s);
  for (i = 0; i < s.size(); i++) {
    if (isalpha(s[i])) {
      s1 = tostr(i);
      if (i != 0 && s1 != s2) tr = 0;
      i = cont;
      a[t] = check(s1);
      b[a[t]] = 1;
      if (a[t] < a[t - 1]) ch = 0;
      if ((a[t - 1] > 0 && a[t - 1] < 4) && a[t] > 3) ch = 0;
      if (a[t] == 2 && a[t - 1] == 2) ch = 0;
      if (a[t] == 5 && a[t - 1] == 5) ch = 0;
      t++;
    }
  }
  if (t > 2 && (!b[2] && !b[5]) && !tr) ch = 0;
  if (ch)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
