#include <bits/stdc++.h>
using namespace std;
vector<int> a;
string b[6] = {"lios", "liala", "etr", "etra", "initis", "inites"};
int type(string s) {
  reverse(s.begin(), s.end());
  for (int i = 0; i < 6; i++)
    if (s.substr(0, b[i].size()) == b[i]) return i;
  return -1;
}
char s[100005];
int main(void) {
  for (int i = 0; i < 6; i++) reverse(b[i].begin(), b[i].end());
  while (cin >> s) {
    a.push_back(type(string(s)));
  }
  int odd = 0, even = 0, c = 0, f = 0;
  for (int i = 0; i < (int)a.size(); i++) {
    if (a[i] % 2)
      ++odd;
    else if (a[i] % 2 == 0)
      ++even;
    if (a[i] == -1) f = 1;
    if (a[i] == 2 || a[i] == 3) ++c;
    if (i && a[i] < a[i - 1]) f = 1;
  }
  if ((int)a.size() == 1 && a[0] != -1)
    puts("YES");
  else if (f || (odd && even) || c != 1)
    puts("NO");
  else
    puts("YES");
}
