#include <bits/stdc++.h>
using namespace std;
const int maxint = -1u >> 1;
const string mas[] = {"lios", "etr", "initis"};
const string fem[] = {"liala", "etra", "inites"};
const int maxn = 100000 + 10;
pair<int, int> rec[maxn];
string word;
int n;
bool check() {
  if (n == 1) {
    return rec[0].first >= 0;
  }
  int sta = -1, step = 0;
  for (int i = 0; i < n; ++i) {
    if (rec[i].first == -1) return false;
    if (sta < 0) sta = rec[i].first;
    if (sta != rec[i].first) return false;
    if (step == 0) {
      if (rec[i].second == 2) return false;
      step = rec[i].second;
    } else if (step == 1) {
      if (rec[i].second <= 1) return false;
      step = rec[i].second;
    } else if (step == 2) {
      if (rec[i].second <= 1) return false;
    }
  }
  if (step == 0) return false;
  return true;
}
bool has(const string &word, const string &key) {
  if (word.size() < key.size()) return false;
  for (int i = 0; i < ((int)(key).size()); ++i) {
    if (word[word.size() - key.size() + i] != key[i]) return false;
  }
  return true;
}
pair<int, int> type(const string &word) {
  for (int i = 0; i < 3; ++i) {
    if (has(word, mas[i])) return make_pair(0, i);
    if (has(word, fem[i])) return make_pair(1, i);
  }
  return make_pair(-1, 0);
}
int main() {
  n = 0;
  while (cin >> word) {
    rec[n++] = type(word);
  }
  bool flag = check();
  if (flag)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
