#include <bits/stdc++.h>
using namespace std;
bool isAdjective(string &s) {
  int p1 = s.find("soil");
  int p2 = s.find("alail");
  return (p1 == 0 || p2 == 0);
}
bool isNoun(string &s) {
  int p1 = s.find("rte");
  int p2 = s.find("arte");
  return (p1 == 0 || p2 == 0);
}
bool isVerb(string &s) {
  int p1 = s.find("sitini");
  int p2 = s.find("setini");
  return (p1 == 0 || p2 == 0);
}
bool getGenero(string s) {
  int p1 = s.find("soil");
  int p2 = s.find("sitini");
  int p3 = s.find("rte");
  if (p1 == 0 || p2 == 0 || p3 == 0) return 0;
  p1 = s.find("alail");
  p2 = s.find("arte");
  p3 = s.find("setini");
  if (p1 == 0 || p2 == 0 || p3 == 0) return 1;
}
bool sameSex(vector<string> V) {
  for (int i = 1; i < V.size(); i++)
    if (getGenero(V[i]) != getGenero(V[i - 1])) return 0;
  return 1;
}
bool vis[1000];
int main() {
  string s, aux;
  vector<string> V;
  getline(cin, s);
  istringstream in(s);
  while (in >> aux) reverse((aux).begin(), (aux).end()), V.push_back(aux);
  if (V.size() == 1) {
    if (isAdjective(V[0]) || isNoun(V[0]) || isVerb(V[0]))
      puts("YES");
    else
      puts("NO");
  } else {
    int adj = 0, noun = 0, verb = 0, p = 0;
    while (p < V.size() && isAdjective(V[p])) vis[p] = 1, p++, adj++;
    while (p < V.size() && isNoun(V[p])) vis[p] = 1, p++, noun++;
    while (p < V.size() && isVerb(V[p])) vis[p] = 1, p++, verb++;
    bool sex = sameSex(V);
    if (adj >= 0 && noun == 1 && verb >= 0 && sex) {
      bool ok = 1;
      for (int i = 0; i < V.size(); i++)
        if (!vis[i]) ok = 0;
      if (ok)
        puts("YES");
      else
        puts("NO");
    } else
      puts("NO");
  }
}
