#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1E-9;
string vs[6] = {"lios", "liala", "etr", "etra", "initis", "inites"};
int calc(string& s) {
  for (int i = 0; i < (int)6; i++)
    if (s.size() >= vs[i].size() &&
        s.substr(s.size() - vs[i].size(), vs[i].size()) == vs[i])
      return i;
  return -1;
}
void out() {
  cout << "NO\n";
  exit(0);
}
int main() {
  vector<int> a;
  string s;
  while (cin >> s) a.push_back(calc(s));
  int n = a.size();
  for (int i = 0; i < (int)n; i++)
    if (a[i] == -1) out();
  if (n == 1) {
    cout << "YES\n";
    return 0;
  }
  for (int i = 0; i < (int)n - 1; i++)
    if ((a[i + 1] - a[i]) & 1) out();
  int pos = -1;
  for (int i = 0; i < (int)n; i++)
    if (a[i] / 2 == 1) pos = i;
  if (pos == -1) out();
  for (int i = 0; i < (int)pos; i++)
    if (a[i] / 2) out();
  for (int i = (int)pos + 1; i < (int)n; i++)
    if (a[i] / 2 != 2) out();
  cout << "YES\n";
}
