#include <bits/stdc++.h>
using namespace std;
int flag, gender, ok, t, cnt;
int cal[10005];
string s;
string x[6] = {"lios", "liala", "etr", "etra", "initis", "inites"}, y[10005];
int cmp(string a, string b) {
  int len1 = a.size(), len2 = b.size();
  for (int i = 0; i < len2; i++)
    if (a[len1 - len2 + i] != b[i]) return 0;
  return 1;
}
void over(string s) {
  cout << s << endl;
  exit(0);
}
int main() {
  int cnt = 0;
  while (cin >> s) {
    cnt++;
    y[cnt] = s;
    flag = 0;
    for (int i = 0; i < 6; i++)
      if (cmp(y[cnt], x[i])) {
        flag = 1;
        cal[cnt] = i;
      }
    if (flag == 0) over("NO");
    if (cin.get() == '\n') break;
  }
  if (cnt == 1) over("YES");
  for (int i = 1; i < cnt; i++)
    if (cal[i] % 2 != cal[i + 1] % 2 || cal[i] > cal[i + 1]) over("NO");
  flag = 0;
  for (int i = 1; i <= cnt; i++)
    if (cal[i] / 2 == 1) flag++;
  if (flag != 1) over("NO");
  over("YES");
  return 0;
}
