#include <bits/stdc++.h>
using namespace std;
string s, str;
vector<string> male = {"lios", "etr", "initis"};
vector<string> female = {"liala", "etra", "inites"};
map<long long, long long> gender;
long long f[5];
long long getgender() {
  for (auto it : male) {
    long long sz = it.size();
    if (str.size() >= sz && str.substr(str.size() - sz) == it) return 1;
  }
  return 0;
}
long long typeofword() {
  for (long long i = 0; i < 3; i++) {
    long long sz = male[i].size();
    if (str.size() >= sz && str.substr(str.size() - sz) == male[i]) return i;
  }
  for (long long i = 0; i < 3; i++) {
    long long sz = female[i].size();
    if (str.size() >= sz && str.substr(str.size() - sz) == female[i]) return i;
  }
  return 3;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  getline(cin, s);
  stringstream ss(s);
  vector<long long> cur, shouldbe;
  while (ss >> str) {
    gender[getgender()]++;
    cur.push_back(typeofword());
    f[cur.back()]++;
  }
  if (cur.size() == 1 && f[3] == 0) {
    cout << "YES";
    return 0;
  }
  shouldbe = cur;
  sort(shouldbe.begin(), shouldbe.end());
  cerr << f[1];
  if (shouldbe != cur || gender.size() > 1 || f[1] != 1 || f[3] > 0)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
