#include <bits/stdc++.h>
using namespace std;
int allMale = -1;
int nc = -1;
string male[] = {"lios", "etr", "initis"};
string female[] = {"liala", "etra", "inites"};
vector<string> msg;
vector<int> idx;
bool inLang(const string &s) {
  size_t x;
  for (int i = 0; i < 3; ++i) {
    x = s.rfind(male[i]);
    if (x != string::npos && x == s.size() - male[i].size()) {
      if (allMale == 0) return false;
      if (i == 1) {
        if (nc != -1) return false;
        nc = idx.size();
      }
      allMale = 1;
      idx.push_back(i);
      return true;
    }
    x = s.rfind(female[i]);
    if (x != string::npos && x == s.size() - female[i].size()) {
      if (allMale == 1) return false;
      if (i == 1) {
        if (nc != -1) return false;
        nc = idx.size();
      }
      allMale = 0;
      idx.push_back(i);
      return true;
    }
  }
  return false;
}
void solve() {
  string s;
  while (cin >> s) {
    if (!inLang(s)) {
      cout << "NO" << endl;
      return;
    }
    msg.push_back(s);
  }
  if (nc == -1) {
    if (idx.size() == 1) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
    return;
  }
  for (int i = 0; i < nc; ++i) {
    if (idx[i] != 0) {
      cout << "NO" << endl;
      return;
    }
  }
  for (int i = nc + 1; i < (int)idx.size(); ++i) {
    if (idx[i] != 2) {
      cout << "NO" << endl;
      return;
    }
  }
  cout << "YES" << endl;
  return;
}
int main() {
  solve();
  return 0;
}
