#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const double eps = 1e-9;
string words[100005];
int type[100005];
int gender[100005];
void reverse(string &c) {
  for (int i = (0); i < (int((c).size()) / 2); i++) {
    char tmp = c[i];
    c[i] = c[int((c).size()) - i - 1];
    c[int((c).size()) - i - 1] = tmp;
  }
}
int main() {
  string line;
  getline(cin, line);
  stringstream ss(line);
  int n = 0;
  while (true) {
    string word;
    ss >> word;
    if (ss.fail()) break;
    words[n++] = word;
  }
  for (int i = (0); i < (n); i++) reverse(words[i]);
  for (int i = (0); i < (n); i++) {
    if (words[i].find("soil") == 0) {
      type[i] = 0;
      gender[i] = 0;
      continue;
    };
    if (words[i].find("alail") == 0) {
      type[i] = 0;
      gender[i] = 1;
      continue;
    };
    if (words[i].find("rte") == 0) {
      type[i] = 1;
      gender[i] = 0;
      continue;
    };
    if (words[i].find("arte") == 0) {
      type[i] = 1;
      gender[i] = 1;
      continue;
    };
    if (words[i].find("sitini") == 0) {
      type[i] = 2;
      gender[i] = 0;
      continue;
    };
    if (words[i].find("setini") == 0) {
      type[i] = 2;
      gender[i] = 1;
      continue;
    };
    gender[i] = -1;
  }
  if (n == 1 && gender[0] != -1) {
    cout << "YES\n";
    return 0;
  }
  bool SameGender = true;
  for (int i = (1); i < (n); i++)
    if (gender[i] != gender[0]) SameGender = false;
  if (!SameGender || gender[0] == -1) {
    cout << "NO\n";
    return 0;
  }
  int p1, p2, p3;
  p1 = 0;
  while (p1 < n && type[p1] == 0) ++p1;
  p2 = p1;
  while (p2 < n && type[p2] == 1) ++p2;
  p3 = p2;
  while (p3 < n && type[p3] == 2) ++p3;
  if (p3 == n && p2 == p1 + 1)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
