#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
vector<pair<string, pair<int, int> > > rules;
pair<int, int> identify(const string &str) {
  for (__typeof__((rules).begin()) it = (rules).begin(); it != (rules).end();
       it++)
    if (str.substr(max(0, int((str).size()) - int((it->first).size()))) ==
        it->first)
      return it->second;
  return make_pair(-1, -1);
}
string process() {
  int cnt = 0;
  string word;
  vector<pair<int, int> > results;
  while (cin >> word) {
    cnt++;
    pair<int, int> tmp = identify(word);
    if (tmp.first < 0) return "NO";
    if (results.empty())
      results.push_back(tmp);
    else if (tmp != results.back())
      results.push_back(tmp);
    else if (tmp.second == 1)
      return "NO";
  }
  if (cnt == 1) return "YES";
  int gender = results.front().first;
  int i = 0;
  if (results[i].second == 0) i++;
  if (i >= int((results).size())) return "NO";
  if (results[i].first != gender || results[i].second != 1) return "NO";
  i++;
  if (i >= int((results).size())) return "YES";
  if (results[i].first != gender || results[i].second != 2) return "NO";
  i++;
  if (i >= int((results).size())) return "YES";
  return "NO";
}
int main() {
  rules.push_back(make_pair("lios", make_pair(0, 0)));
  rules.push_back(make_pair("liala", make_pair(1, 0)));
  rules.push_back(make_pair("etr", make_pair(0, 1)));
  rules.push_back(make_pair("etra", make_pair(1, 1)));
  rules.push_back(make_pair("initis", make_pair(0, 2)));
  rules.push_back(make_pair("inites", make_pair(1, 2)));
  cout << process() << endl;
}
