#include <bits/stdc++.h>
using namespace std;
string a[6] = {"lios", "liala", "etr", "etra", "initis", "inites"};
string s, ss;
vector<long long> Space;
vector<string> word;
long long cnt = 0;
long long n;
long long f(string s) {
  long long ans = -1;
  long long i, j, k;
  for (i = 0; i < 6; i++) {
    if (s.size() >= a[i].size()) {
      long long cnt = 0;
      for (j = a[i].size() - 1, k = s.size() - 1; j >= 0; j--, k--) {
        if (a[i][j] == s[k]) cnt++;
      }
      if (cnt == a[i].size()) return i;
    }
  }
  return ans;
}
int main() {
  getline(cin, s);
  ss = s + ' ';
  n = ss.size();
  Space.push_back(-1);
  long long i;
  for (i = 0; i < n; i++) {
    if (ss[i] == ' ') {
      cnt++;
      Space.push_back(i);
    }
  }
  if (cnt == 1) {
    if (f(s) != -1) {
      cout << "YES";
      return 0;
    }
    cout << "NO";
    return 0;
  }
  for (i = 1; i < Space.size(); i++) {
    word.push_back(ss.substr(Space[i - 1] + 1, Space[i] - Space[i - 1] - 1));
  }
  long long num = -1;
  long long tp = -1;
  for (i = 0; i < word.size(); i++) {
    if (f(word[i]) == 2 || f(word[i]) == 3) {
      num = i;
      tp = f(word[i]);
    }
  }
  if (num == -1) {
    cout << "NO";
    return 0;
  }
  for (i = 0; i < num; i++) {
    if (f(word[i]) != tp - 2) {
      cout << "NO";
      return 0;
    }
  }
  for (i = num + 1; i < word.size(); i++) {
    if (f(word[i]) != tp + 2) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
