#include <bits/stdc++.h>
using namespace std;
const string suffixes[6] = {"lios", "liala", "etr", "etra", "initis", "inites"};
int checkWord(const string& word) {
  int len = word.length();
  for (int i = 0; i < 6; ++i) {
    int suff_len = suffixes[i].length();
    if (len >= suff_len && word.substr(len - suff_len, suff_len) == suffixes[i])
      return i;
  }
  return -1;
}
int main() {
  string word;
  int num_words = 0, masc = 0, fem = 0;
  int prev_type = 0;
  int gram = 1;
  while (cin >> word) {
    int type = checkWord(word);
    if (type == -1) {
      cout << "NO\n";
      return 0;
    }
    if (type & 1) {
      fem = 1;
    } else {
      masc = 1;
    }
    type /= 2;
    if (type == 0) {
      if (prev_type != 0 && num_words > 0) {
        gram = 0;
      }
    } else if (type == 1) {
      if (prev_type != 0) {
        gram = 0;
      }
      prev_type = 1;
    } else {
      if (prev_type != 1 && prev_type != 2) {
        gram = 0;
      }
      prev_type = 2;
    }
    ++num_words;
  }
  if (num_words == 1 || (prev_type > 0 && masc ^ fem && gram)) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
