#include <bits/stdc++.h>
using namespace std;
inline int isAdjective(string& word) {
  if (word.size() > 3 && word.substr(word.size() - 4, 4) == "lios") return 1;
  if (word.size() > 4 && word.substr(word.size() - 5, 5) == "liala") return 2;
  return 0;
}
inline int isNoun(string& word) {
  if (word.size() > 2 && word.substr(word.size() - 3, 3) == "etr") return 1;
  if (word.size() > 3 && word.substr(word.size() - 4, 4) == "etra") return 2;
  return 0;
}
inline int isVerb(string& word) {
  if (word.size() > 5 && word.substr(word.size() - 6, 6) == "initis") return 1;
  if (word.size() > 5 && word.substr(word.size() - 6, 6) == "inites") return 2;
  return 0;
}
int main() {
  int endAdj = 0, endNoun = 0, endVerb = 0, gender, genderAll = 0, words = 0;
  bool firstValid = false;
  string word, ans;
  while (cin >> word) {
    words++;
    if (ans == "NO") continue;
    if ((gender = isAdjective(word)) > 0) {
      if (genderAll == 0)
        genderAll = gender;
      else if (endVerb > 0 || endNoun > 0 || gender != genderAll)
        ans = "NO";
      if (words == 1) firstValid = true;
      endAdj = 1;
    } else if ((gender = isNoun(word)) > 0) {
      if (genderAll == 0)
        genderAll = gender;
      else if (endNoun > 0 || endVerb > 0 || gender != genderAll)
        ans = "NO";
      if (words == 1) firstValid = true;
      endNoun = 1;
    } else if ((gender = isVerb(word)) > 0) {
      if (genderAll == 0)
        ans = "NO";
      else if (endNoun == 0 || gender != genderAll)
        ans = "NO";
      if (words == 1) firstValid = true;
      endVerb = 1;
    } else
      ans = "NO";
  }
  if (words == 1 && firstValid)
    cout << "YES" << endl;
  else if (ans == "NO" || endNoun == 0)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
