#include <bits/stdc++.h>
using namespace std;
bool end(string a, string b) {
  return a.size() >= b.size() && a.substr(a.size() - b.size()) == b;
}
int get_gender(string s) {
  if (end(s, "lios") || end(s, "etr") || end(s, "initis")) return 0;
  if (end(s, "etra") || end(s, "liala") || end(s, "inites")) return 1;
  return -1;
}
int get_type(string s) {
  if (end(s, "lios") || end(s, "liala")) return 0;
  if (end(s, "etr") || end(s, "etra")) return 1;
  if (end(s, "initis") || end(s, "inites")) return 2;
  return -1;
}
string arr[100001];
int main() {
  int n = 0;
  while (cin >> arr[n]) n++;
  if (n == 1) {
    if (get_gender(arr[0]) >= 0 && get_type(arr[0]) >= 0)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
    return 0;
  }
  bool bad = false;
  for (int i = 0; i < n - 1 && !bad; i++)
    if (get_gender(arr[i]) != get_gender(arr[i + 1])) bad = true;
  if (bad) {
    cout << "NO" << endl;
    return 0;
  }
  int type, state = 0;
  for (int i = 0; i < n && !bad; i++) {
    type = get_type(arr[i]);
    if (type == -1)
      bad = true;
    else if (state == 0) {
      if (type == 1) state = 1;
      if (type == 2) bad = true;
    } else if (state == 1) {
      if (type <= 1)
        bad = true;
      else
        state = 2;
    } else {
      if (type <= 1) bad = true;
    }
  }
  if (bad || state == 0)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
