#include <bits/stdc++.h>
using namespace std;
string suf[3][2] = {{"lios", "liala"}, {"etr", "etra"}, {"initis", "inites"}};
pair<int, int> f(string s) {
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 2; j++) {
      string t = suf[i][j];
      if (s.size() >= t.size() &&
          s.substr(s.size() - t.size(), t.size()) == t) {
        return {i + 1, j};
      }
    }
  }
  return {0, 0};
}
int cnt[2];
int main() {
  string s;
  int cur = 1;
  int p = 0;
  int len = 0;
  while (cin >> s) {
    pair<int, int> z = f(s);
    int x = z.first;
    cnt[z.second]++;
    if (cur > x) {
      cout << "NO" << endl;
      return 0;
    }
    if (x == 2) {
      p++;
    }
    cur = max(x, cur);
    len++;
  }
  cout << (((p == 1 && max(cnt[0], cnt[1]) == len) || len == 1) ? "YES" : "NO")
       << endl;
  return 0;
}
