#include <bits/stdc++.h>
using namespace std;
const long double epsilon = 1e-9;
bool endWith(const string& str, string mas[], int len);
bool adjective(const string& str) {
  string mas[2] = {"lios", "liala"};
  return endWith(str, mas, 2);
}
bool verb(const string& str) {
  string mas[2] = {"initis", "inites"};
  return endWith(str, mas, 2);
}
bool noun(const string& str) {
  string mas[2] = {"etr", "etra"};
  return endWith(str, mas, 2);
}
bool male(const string& str) {
  string mas[3] = {"lios", "etr", "initis"};
  return endWith(str, mas, 3);
}
bool endWith(const string& str, string mas[], int len) {
  for (int i = 0; i < len; i++) {
    if (str.size() < mas[i].size()) continue;
    if (str.substr((int)str.size() - mas[i].size(), mas[i].size()) == mas[i])
      return true;
  }
  return false;
}
int main() {
  vector<string> words;
  string str1;
  getline(cin, str1);
  stringstream ss;
  ss << str1;
  string str;
  while (ss >> str) {
    words.push_back(str);
  }
  if (words.size() == 1) {
    if (noun(words[0]) || verb(words[0]) || adjective(words[0]))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
    return 0;
  }
  bool is_male = false;
  bool is_female = false;
  bool has_adj = false;
  bool has_noun = false;
  bool has_verb = false;
  for (int i = 0; i < words.size(); i++) {
    if (male(words[i]))
      is_male = true;
    else
      is_female = true;
    if (adjective(words[i])) {
      if (has_noun || has_verb) {
        cout << "NO" << endl;
        return 0;
      }
      has_adj = true;
    } else if (noun(words[i])) {
      if (has_noun || has_verb) {
        cout << "NO" << endl;
        return 0;
      }
      has_noun = true;
    } else if (verb(words[i])) {
      has_verb = true;
    } else {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (has_noun && !(is_female && is_male))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
