#include <bits/stdc++.h>
using namespace std;
string te[3][2];
bool en(string s, string t) {
  if (s.size() < t.size()) return 0;
  for (int j = s.size() - 1, j1 = t.size() - 1; j >= 0 && j1 >= 0; j--, j1--) {
    if (s[j] != t[j1]) return 0;
  }
  return 1;
}
int main() {
  te[0][0] = "lios";
  te[0][1] = "liala";
  te[1][0] = "etr";
  te[1][1] = "etra";
  te[2][0] = "initis";
  te[2][1] = "inites";
  string s;
  int ge = -1;
  int in = 0;
  bool ok = 1;
  string s1;
  int nm = 0;
  while (cin >> s) {
    s1 = s;
    nm++;
    int in1 = -1;
    if (ge != -1) {
      for (int i = 0; i < 3; i++) {
        if (en(s, te[i][ge])) {
          in1 = i;
          break;
        }
      }
    } else {
      for (int i = 0; i < 3; i++) {
        if (en(s, te[i][0])) {
          in1 = i;
          ge = 0;
          break;
        }
        if (en(s, te[i][1])) {
          in1 = i;
          ge = 1;
          break;
        }
      }
    }
    if (in1 == -1) {
      ok = 0;
    }
    if (in1 == 1) {
      if (in == 0)
        in = 2;
      else {
        ok = 0;
      }
    }
    if (in1 == 0) {
      if (in > 0) {
        ok = 0;
      }
    }
    if (in1 == 2) {
      if (in < 2) ok = 0;
    }
  }
  if (in == 0) ok = 0;
  if (nm == 1) {
    for (int i = 0; i < 3; i++) {
      ok = ok || en(s1, te[i][0]);
      ok = ok || en(s1, te[i][1]);
    }
  }
  if (ok) {
    printf("YES\n");
  } else
    printf("NO\n");
  return 0;
}
