#include <bits/stdc++.h>
const double pi = acos(-1);
const int MOD = 1e9 + 7;
const int INF = 1e9 + 7;
const int MAXN = 1e5 + 5;
const double eps = 1e-9;
using namespace std;
char tmp[MAXN];
string en[3][2];
vector<string> a;
vector<int> b;
int solve(int ind) {
  for (int i = 0; i < 3; i++)
    for (int j = 0; j < 2; j++)
      if (a[ind].size() >= en[i][j].size() &&
          a[ind].substr(a[ind].size() - en[i][j].size()) == en[i][j])
        return 2 * i + j;
  printf("NO\n");
  exit(0);
}
int main() {
  while (scanf("%s", tmp) > 0) a.push_back((string)tmp);
  int m = a.size();
  en[0][0] = "lios";
  en[0][1] = "liala";
  en[1][0] = "etr";
  en[1][1] = "etra";
  en[2][0] = "initis";
  en[2][1] = "inites";
  for (int i = 0; i < m; i++) b.push_back(solve(i));
  if (m == 1) return !printf("YES\n");
  for (int i = 0; i < m - 1; i++)
    if (b[i] % 2 != b[i + 1] % 2) return !printf("NO\n");
  int cnt = 0;
  for (int i = 0; i < m; i++) {
    b[i] >>= 1;
    if (b[i] == 1) cnt++;
    if (cnt > 1) return !printf("NO\n");
  }
  if (cnt != 1) return !printf("NO\n");
  for (int i = 0; i < m - 1; i++)
    if (b[i] > b[i + 1]) return !printf("NO\n");
  return !printf("YES\n");
}
