#include <bits/stdc++.h>
using namespace std;
string s;
bool chk, male, female;
char q[111111];
int r;
int main() {
  chk = true;
  male = female = false;
  r = 0;
  while (cin >> s) {
    if (s.size() >= 4 && s.substr(s.size() - 4, 4) == "lios") {
      male = true;
      q[r++] = 'a';
    } else if (s.size() >= 5 && s.substr(s.size() - 5, 5) == "liala") {
      female = true;
      q[r++] = 'a';
    } else if (s.size() >= 3 && s.substr(s.size() - 3, 3) == "etr") {
      male = true;
      q[r++] = 'n';
    } else if (s.size() >= 4 && s.substr(s.size() - 4, 4) == "etra") {
      female = true;
      q[r++] = 'n';
    } else if (s.size() >= 6 && s.substr(s.size() - 6, 6) == "initis") {
      male = true;
      q[r++] = 'v';
    } else if (s.size() >= 6 && s.substr(s.size() - 6, 6) == "inites") {
      female = true;
      q[r++] = 'v';
    } else
      chk = false;
  }
  if (r > 1) {
    int id = -1;
    for (int i = 0; i < r; i++)
      if (q[i] == 'n') id = i;
    if (id < 0)
      chk = false;
    else {
      for (int i = 0; i < id; i++)
        if (q[i] != 'a') chk = false;
      for (int i = id + 1; i < r; i++)
        if (q[i] != 'v') chk = false;
    }
  }
  if (!chk || male && female)
    puts("NO");
  else
    puts("YES");
  return 0;
}
