#include <bits/stdc++.h>
using namespace std;
const int N = 100015;
const int M = 33;
const int K = 670000;
const int LIT = 2500;
const int INF = 1 << 30;
const int base = 137;
const double eps = 1e-10;
const int dir[5][2] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}};
const int dir2[10][2] = {{-1, 0}, {1, 0},  {0, 1},  {0, -1},
                         {1, 0},  {-1, 0}, {0, -1}, {0, 1}};
const int ABS(int a) { return a > 0 ? a : -a; }
char s[N];
vector<pair<long long, long long> > v;
pair<long long, long long> fail = make_pair(-1, -1);
bool valid(char c) {
  if (c >= 'a' && c <= 'z') return 1;
  return 0;
}
pair<long long, long long> check(string str) {
  int len = str.size();
  if (len >= 4 && str.substr(len - 4, 4) == "lios") return make_pair(0, 0);
  if (len >= 5 && str.substr(len - 5, 5) == "liala") return make_pair(0, 1);
  if (len >= 3 && str.substr(len - 3, 3) == "etr") return make_pair(1, 0);
  if (len >= 4 && str.substr(len - 4, 4) == "etra") return make_pair(1, 1);
  if (len >= 6 && str.substr(len - 6, 6) == "initis") return make_pair(2, 0);
  if (len >= 6 && str.substr(len - 6, 6) == "inites") return make_pair(2, 1);
  return make_pair(-1, -1);
}
bool init() {
  v.clear();
  int len = strlen(s);
  for (int i = 0; i < len;) {
    if (!valid(s[i])) {
      i++;
      continue;
    }
    int j;
    string tmp = "";
    for (j = i; j < len; j++) {
      if (!valid(s[j])) {
        j--;
        break;
      }
      tmp += s[j];
    }
    i = j + 1;
    pair<long long, long long> now = check(tmp);
    if (now == fail) return 0;
    v.push_back(now);
  }
  return 1;
}
void solve() {
  int n = v.size();
  if (n == 1) {
    cout << "YES" << endl;
    return;
  }
  for (int i = 1; i < n; i++) {
    if (v[i].second != v[i - 1].second) {
      cout << "NO" << endl;
      return;
    }
  }
  int cnt[3] = {0}, i, j;
  for (i = 0, j = 0; j < 3; j++) {
    for (; i < n; i++) {
      if (v[i].first == j)
        cnt[j]++;
      else
        break;
    }
  }
  if (i != n) {
    cout << "NO" << endl;
    return;
  }
  if (cnt[1] != 1) {
    cout << "NO" << endl;
    return;
  }
  cout << "YES" << endl;
}
int main() {
  while (gets(s)) {
    if (!init()) {
      cout << "NO" << endl;
      continue;
    }
    solve();
  }
}
