#include <bits/stdc++.h>
using namespace std;
string gender[3][2] = {"lios", "liala", "etr", "etra", "initis", "inites"};
void solve() {
  string s;
  int gen, cnt = 0, cnt2 = 0;
  bool noun = false;
  bool flag = true;
  while (cin >> s) {
    cnt2++;
    bool flagword = false;
    if (!flag) continue;
    for (int i = 0; i < 3; i++)
      for (int j = 0; j < 2; j++)
        if ((int)s.size() - (int)gender[i][j].size() >= 0 &&
            (int)s.rfind(gender[i][j], s.size() - 1) ==
                (int)s.size() - (int)gender[i][j].size()) {
          flagword = true;
          cnt++;
          if (cnt == 1)
            gen = j;
          else if (j != gen) {
            flag = false;
          }
          if (i == 0 && noun == true) {
            flag = false;
          } else if (i == 1 && noun == true) {
            flag = false;
          } else if (i == 2 && noun == false)
            flag = false;
          if (i == 1 && (!noun)) noun = true;
        }
    if (!flagword) flag = false;
  }
  cout << ((cnt == cnt2 && cnt2 == 1) || (flag && noun) ? "YES" : "NO");
}
int main() {
  ios::sync_with_stdio(false);
  solve();
  return 0;
}
