#include <bits/stdc++.h>
using namespace std;
const int MAX = 100000;
const int INF = 1000000001;
int n;
string endings[] = {"etr", "etra", "lios", "liala", "initis", "inites"};
vector<int> text;
int part(string& t) {
  for (int i = 0; i < 6; ++i)
    if (t.size() < endings[i].size())
      return -1;
    else if (t.substr(t.size() - endings[i].size(), endings[i].size()) ==
             endings[i])
      return i;
  return -1;
}
bool skmin() {
  int s = text.size();
  if (!s) return false;
  if (s == 1) return true;
  for (int i = 0; i < s - 1; ++i)
    if ((text[i] & 1) != (text[i + 1] & 1)) return false;
  int a = 0;
  while (a < s && (text[a] == 2 || text[a] == 3)) ++a;
  int v = s - 1;
  while (v >= 0 && (text[v] == 4 || text[v] == 5)) --v;
  return a == v;
}
int main(int argc, char* argv[]) {
  ios_base::sync_with_stdio(0);
  string t;
  while (cin >> t) {
    int p = part(t);
    if (p == -1) {
      cout << "NO" << endl;
      return 0;
    }
    text.push_back(p);
  }
  if (skmin())
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
