#include <bits/stdc++.h>
using namespace std;
string cv[3][2] = {{"lios", "liala"}, {"etr", "etra"}, {"initis", "inites"}};
pair<int, int> tip(string s) {
  int lg_cuvant = s.size();
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 2; j++) {
      string sufix = cv[i][j];
      int lg_sufix = sufix.size();
      if (lg_cuvant >= lg_sufix) {
        if (s.substr(lg_cuvant - lg_sufix) == sufix) {
          return make_pair(i, j);
        }
      }
    }
  }
  return make_pair(-1, -1);
}
int main() {
  pair<int, int> v[100000];
  string s;
  int nr_cuv = 0;
  while (cin >> s) {
    pair<int, int> t = tip(s);
    int gen = t.second;
    if (t.first != -1 && t.second != -1) {
      v[nr_cuv] = t;
      if (v[0].second != gen) {
        cout << "NO";
        return 0;
      }
      nr_cuv++;
    } else {
      cout << "NO";
      return 0;
    }
  }
  if (nr_cuv == 1) {
    cout << "YES";
    return 0;
  } else {
    int i = 0;
    while (i < nr_cuv && v[i].first == 0) i++;
    if (v[i].first != 1) {
      cout << "NO";
      return 0;
    } else {
      i++;
      while (i < nr_cuv && v[i].first == 2) i++;
      if (i != nr_cuv) {
        cout << "NO";
        return 0;
      } else {
        cout << "YES";
        return 0;
      }
    }
  }
  return 0;
}
