#include <bits/stdc++.h>
using namespace std;
int type(const string& s) {
  if (strcmp(s.c_str() + s.size() - 4, "lios") == 0) return 0;
  if (strcmp(s.c_str() + s.size() - 5, "liala") == 0) return 10;
  if (strcmp(s.c_str() + s.size() - 3, "etr") == 0) return 1;
  if (strcmp(s.c_str() + s.size() - 4, "etra") == 0) return 11;
  if (strcmp(s.c_str() + s.size() - 6, "initis") == 0) return 2;
  if (strcmp(s.c_str() + s.size() - 6, "inites") == 0) return 12;
  return -1;
}
int main() {
  int v = 0, p = -1, c = 0;
  while (!cin.eof()) {
    string s;
    cin >> s;
    if (s.empty()) break;
    c++;
    int t = type(s);
    if (t < 0 || (p >= 0 && t != p && t != p + 1)) {
      puts("NO");
      return 0;
    }
    if (t % 10 == 1) v++;
    p = t;
  }
  if (c != 1 && v != 1)
    puts("NO");
  else
    puts("YES");
  return 0;
}
