#include <bits/stdc++.h>
using namespace std;
template <class X>
void input(vector<X>& a, int N) {
  X temp;
  for (long long int i = 0; i < N; i++) {
    cin >> temp;
    a.push_back(temp);
  }
}
void solve() {
  vector<string> a;
  string temp;
  while (cin >> temp) {
    a.push_back(temp);
  }
  string x[6];
  x[0] = "lios";
  x[1] = "liala";
  x[2] = "etr";
  x[3] = "etra";
  x[4] = "initis";
  x[5] = "inites";
  vector<int> p;
  for (string s : a) {
    bool alpha = false;
    for (int i = 3; i <= min(6, (int)s.length()); i++) {
      if (find(x, x + 6, s.substr(s.length() - i, i)) != x + 6) {
        p.push_back(find(x, x + 6, s.substr(s.length() - i, i)) - (x));
        alpha = true;
        break;
      }
    }
    if (alpha == false) {
      cout << "NO";
      return;
    }
  }
  for (long long int i = 1; i < p.size(); i++) {
    if ((p[i] ^ p[i - 1]) & 1 || p[i] < p[i - 1]) {
      cout << "NO";
      return;
    }
  }
  if (p.size() > 1 &&
      (count(p.begin(), p.end(), 2) + count(p.begin(), p.end(), 3) != 1)) {
    cout << "NO";
  } else {
    cout << "YES";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
