#include <bits/stdc++.h>
using namespace std;
int check(string a) {
  vector<string> s = {"lios", "etr", "initis", "liala", "etra", "inites"};
  for (int i = (0); i <= (5); ++i) {
    int len = s[i].length();
    if (a.length() >= len)
      if (a.substr(a.length() - len) == s[i]) return i;
  }
  return -1;
}
int main() {
  ios::sync_with_stdio(false);
  cout.setf(ios::fixed);
  cout.precision(20);
  string word;
  int m = 0, f = 0;
  int noun = 0;
  int flag = 1;
  int adj = 1;
  vector<string> store;
  while (cin >> word) store.push_back(word);
  if (store.size() == 1) {
    if (check(store[0]) != -1)
      return 0 * puts("YES");
    else
      return 0 * puts("NO");
  }
  for (auto v : store) {
    word = v;
    int type = check(word);
    if (type == -1) flag = 0;
    if (type < 3)
      m++;
    else
      f++;
    if (type == 1 || type == 4) {
      noun++;
      if (noun > 1) flag = 0;
      adj = 0;
    }
    if (type == 0 || type == 3)
      if (adj == 0) flag = 0;
    if (type == 2 || type == 5) {
      if (noun == 0) flag = 0;
    }
  }
  if (noun == 0) flag = 0;
  if (m && f) flag = 0;
  cout << (flag > 0 ? "YES" : "NO") << '\n';
  return 0;
}
