#include <bits/stdc++.h>
using namespace std;
using namespace std;
double EPS = 1e-8;
bool F(string s1, string s2) {
  if (s1.length() < s2.length()) return 0;
  reverse(s1.begin(), s1.end());
  reverse(s2.begin(), s2.end());
  for (int i = 0; i < s2.length(); i++) {
    if (s1[i] != s2[i]) return 0;
  }
  return 1;
}
pair<int, int> f(string s) {
  string s1;
  s1 = "lios";
  if (F(s, s1)) return make_pair(0, 0);
  s1 = "liala";
  if (F(s, s1)) return make_pair(0, 1);
  s1 = "etr";
  if (F(s, s1)) return make_pair(1, 0);
  s1 = "etra";
  if (F(s, s1)) return make_pair(1, 1);
  s1 = "initis";
  if (F(s, s1)) return make_pair(2, 0);
  s1 = "inites";
  if (F(s, s1)) return make_pair(2, 1);
  return make_pair(-1, -1);
}
vector<pair<int, int> > a;
int yes() {
  cout << "YES" << endl;
  return 0;
}
int no() {
  cout << "NO" << endl;
  return 0;
}
int main() {
  string s;
  while (cin >> s) {
    a.push_back(f(s));
  }
  if (a.size() == 1) {
    if (a[0].first == -1) return no();
    return yes();
  }
  for (int i = 0; i < a.size(); i++) {
    if (a[i].first == -1) return no();
    if (a[i].second != a[0].second) return no();
  }
  int st = 0;
  for (int i = 0; i < a.size(); i++) {
    if (st == 0) {
      if (a[i].first == 0) continue;
      if (a[i].first == 2) return no();
      if (a[i].first == 1) st++;
      continue;
    }
    if (st == 1) {
      if (a[i].first == 2) {
        st++;
        continue;
      }
      return no();
    }
    if (st == 2) {
      if (a[i].first != 2) return no();
    }
  }
  if (st == 0) return no();
  return yes();
}
