#include <bits/stdc++.h>
using namespace std;
const int M = 100000 + 10;
string word[M];
string temp[6] = {"lios", "liala", "etr", "etra", "initis", "inites"};
int main() {
  string s;
  getline(cin, s);
  int num = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == ' ') {
      num++;
    }
  }
  istringstream ss(s);
  for (int i = 0; i <= num; i++) {
    ss >> word[i];
  }
  if (num == 0) {
    bool ok = false;
    for (int i = 0; i < 6; i++) {
      string t = temp[i];
      int len = t.length();
      int eq = 0;
      for (int j = word[0].length() - 1, k = len - 1;
           j >= word[0].length() - len && word[0].length() >= len && k >= 0;
           j--, k--) {
        if (word[0][j] == t[k]) {
          eq++;
        }
      }
      if (eq == len) {
        ok = true;
        break;
      }
    }
    if (ok) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  } else {
    vector<int> gender;
    for (int id = 0; id <= num; id++) {
      bool ok = false;
      int igender = -1;
      for (int i = 0; i < 6; i++) {
        string t = temp[i];
        int len = t.length();
        int eq = 0;
        for (int j = word[id].length() - 1, k = len - 1;
             j >= word[id].length() - len && word[id].length() >= len && k >= 0;
             j--, k--) {
          if (word[id][j] == t[k]) {
            eq++;
          }
        }
        if (eq == len) {
          ok = true;
          igender = i;
          break;
        }
      }
      if (ok == true) {
        gender.push_back(igender);
      }
    }
    if (gender.size() == 0) {
      cout << "NO" << endl;
    } else {
      bool number = (gender.size() == num + 1 ? true : false);
      bool incr = true;
      for (int i = 0; i < gender.size() - 1; i++) {
        if (gender[i] > gender[i + 1]) {
          incr = false;
        }
      }
      bool oddeven = true;
      for (int i = 0; i < gender.size() - 1; i++) {
        if (gender[i] % 2 != gender[i + 1] % 2) {
          oddeven = false;
        }
      }
      int num_noun = 0;
      for (int i = 0; i < gender.size(); i++) {
        if (gender[i] == 2 || gender[i] == 3) {
          num_noun++;
        }
      }
      if (number && incr && oddeven && num_noun == 1) {
        cout << "YES" << endl;
      } else {
        cout << "NO" << endl;
      }
    }
  }
  return 0;
}
