#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:10000000 /HEAP:10000000")
using namespace std;
pair<int, int> num(string s) {
  int n = s.size();
  if (n >= 4 && s.substr(n - 4, 4) == "lios") return make_pair(0, 1);
  if (n >= 5 && s.substr(n - 5, 5) == "liala") return make_pair(0, 0);
  if (n >= 3 && s.substr(n - 3, 3) == "etr") return make_pair(1, 1);
  if (n >= 4 && s.substr(n - 4, 4) == "etra") return make_pair(1, 0);
  if (n >= 6 && s.substr(n - 6, 6) == "initis") return make_pair(2, 1);
  if (n >= 6 && s.substr(n - 6, 6) == "inites") return make_pair(2, 0);
  return make_pair(-1, -1);
}
int main() {
  vector<pair<int, int> > v;
  string s;
  while (cin >> s) v.push_back(num(s));
  int i, n = v.size(), pos = -1;
  if (v[0].first == -1) {
    cout << "NO";
    return 0;
  }
  if (n == 1) {
    cout << "YES";
    return 0;
  }
  for (i = 1; i < n; i++)
    if (v[i].second != v[i - 1].second) {
      cout << "NO";
      return 0;
    }
  i = 0;
  while (v[i].first == 0 && i < n) i++;
  pos = i - 1;
  while (v[i].first == 1 && i < n) i++;
  if (i - 1 - pos != 1) {
    cout << "NO";
    return 0;
  }
  pos = i - 1;
  while (v[i].first == 2 && i < n) i++;
  if (i != n)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
