#include <bits/stdc++.h>
using namespace std;
string dic[6] = {"lios", "liala", "etr", "etra", "initis", "inites"};
string s;
int n, st;
int a[100010];
bool ok(string s1, string s) {
  if (s1.length() > s.length()) return false;
  int i = s1.length();
  int j = s.length();
  while (i >= 0) {
    if (s1[i] != s[j]) return false;
    i--;
    j--;
  }
  return true;
}
int find(string s) {
  for (int i = 0; i < 6; i++)
    if (ok(dic[i], s)) return i;
  return 7;
}
int main() {
  n = 0;
  while (cin >> s) {
    n += 1;
    a[n] = find(s);
  }
  if (n == 1 && a[n] <= 5) {
    cout << "YES";
    return 0;
  }
  for (int i = 1; i <= n; i++)
    if (a[i] > 5) {
      cout << "NO";
      return 0;
    }
  st = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] / 2 == 1) {
      st = i;
      break;
    }
  if (st == 0) {
    cout << "NO";
    return 0;
  }
  for (int i = st - 1; i >= 1; i--)
    if (a[i] / 2 != 0 || a[i] % 2 != a[st] % 2) {
      cout << "NO";
      return 0;
    }
  for (int i = st + 1; i <= n; i++)
    if (a[i] / 2 != 2 || a[i] % 2 != a[st] % 2) {
      cout << "NO";
      return 0;
    }
  cout << "YES";
  return 0;
}
