#include <bits/stdc++.h>
using namespace std;
long long int ESP = 1e18;
long long int FCB = 1e9 + 7;
long long int dir[][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
long long int doit(string str) {
  if (str.length() >= 4 && str.substr(str.size() - 4, 4) == "lios")
    return 0;
  else if (str.length() >= 5 && str.substr(str.size() - 5, 5) == "liala")
    return 1;
  else if (str.length() >= 3 && str.substr(str.size() - 3, 3) == "etr")
    return 2;
  else if (str.length() >= 4 && str.substr(str.size() - 4, 4) == "etra")
    return 3;
  else if (str.length() >= 6 && str.substr(str.size() - 6, 6) == "initis")
    return 4;
  else if (str.length() >= 6 && str.substr(str.size() - 6, 6) == "inites")
    return 5;
  return -1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  string str;
  vector<long long int> vv;
  while (cin >> str) vv.push_back(doit(str));
  long long int zz = vv.size();
  bool male = 0, female = 0;
  for (long long int i = 0; i < zz; i++) {
    if (vv[i] == -1) {
      cout << "NO"
           << "\n";
      return 0;
    }
    if (vv[i] % 2 == 0)
      male = 1;
    else
      female = 1;
  }
  if (zz == 1) {
    cout << "YES"
         << "\n";
    return 0;
  }
  if (male && female) {
    cout << "NO"
         << "\n";
    return 0;
  }
  if (male) {
    long long int idx = -1;
    for (long long int i = 0; i < zz; i++) {
      if (vv[i] == 2) {
        idx = i;
        break;
      }
    }
    bool first = 0;
    if (idx == -1) {
      cout << "NO"
           << "\n";
      return 0;
    }
    for (long long int i = 0; i < idx; i++) {
      if (vv[i] != 0) first = 1;
    }
    for (long long int i = idx + 1; i < zz; i++) {
      if (vv[i] != 4) first = 1;
    }
    if (!first)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  } else {
    long long int idx = -1;
    for (long long int i = 0; i < zz; i++) {
      if (vv[i] == 3) {
        idx = i;
        break;
      }
    }
    bool first = 0;
    if (idx == -1) {
      cout << "NO"
           << "\n";
      return 0;
    }
    for (long long int i = 0; i < idx; i++) {
      if (vv[i] != 1) first = 1;
    }
    for (long long int i = idx + 1; i < zz; i++) {
      if (vv[i] != 5) first = 1;
    }
    if (!first)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
  return 0;
}
