#include <bits/stdc++.h>
using namespace std;
string s;
char str[2][3][10]{{"lios", "etr", "initis"}, {"liala", "etra", "inites"}};
char v[100005];
void prNO() {
  cout << "NO\n";
  exit(0);
}
void prYES() {
  cout << "YES\n";
  exit(0);
}
int main() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  int m = 0, f = 0, ctr = 0;
  while (cin >> s) {
    if (s.size() >= 4 and s.compare(s.size() - 4, 4, str[0][0]) == 0)
      m++, v[ctr++] = 'l';
    else if (s.size() >= 3 and s.compare(s.size() - 3, 3, str[0][1]) == 0)
      m++, v[ctr++] = 'e';
    else if (s.size() >= 6 and s.compare(s.size() - 6, 6, str[0][2]) == 0)
      m++, v[ctr++] = 'i';
    else if (s.size() >= 5 and s.compare(s.size() - 5, 5, str[1][0]) == 0)
      f++, v[ctr++] = 'l';
    else if (s.size() >= 4 and s.compare(s.size() - 4, 4, str[1][1]) == 0)
      f++, v[ctr++] = 'e';
    else if (s.size() >= 6 and s.compare(s.size() - 6, 6, str[1][2]) == 0)
      f++, v[ctr++] = 'i';
    else
      prNO();
  }
  if (m and f) prNO();
  if (ctr == 1) prYES();
  int pos = 0;
  while (pos < ctr and v[pos] == 'l') pos++;
  if (pos < ctr and v[pos] == 'e')
    pos++;
  else
    prNO();
  while (pos < ctr and v[pos] == 'i') pos++;
  if (pos == ctr)
    prYES();
  else
    prNO();
  return 0;
}
