#include <bits/stdc++.h>
using namespace std;
int t[50005], l[] = {4, 5, 3, 4, 6, 6};
string u[] = {"lios", "liala", "etr", "etra", "initis", "inites"};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m = 0, i;
  string s;
  while (cin >> s) {
    n = s.size();
    for (i = 0; i < 6; i++)
      if (n >= l[i] && s.substr(n - l[i], l[i]) == u[i]) {
        t[m++] = i;
        break;
      }
    if (i == 6) {
      cout << "NO";
      return 0;
    }
  }
  if (m == 1) {
    cout << "YES";
    return 0;
  }
  for (i = 1; i < m; i++)
    if ((t[i] & 1) ^ (t[0] & 1) || t[i] < t[i - 1]) {
      cout << "NO";
      return 0;
    }
  n = 0;
  for (i = 0; i < m; i++)
    if (t[i] == 2 || t[i] == 3) n++;
  if (n == 1)
    cout << "YES";
  else
    cout << "NO";
}
