#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
const string s[] = {"lios", "liala", "etr", "etra", "initis", "inites"};
map<string, int> mp;
string h[N];
int a[N];
inline int get_s(string &s) {
  if (s.size() < 3) return 0;
  for (int i = 3; i <= 6; i++) {
    if (i > s.size()) return 0;
    if (mp.find(s.substr(s.size() - i, i)) != mp.end())
      return mp[s.substr(s.size() - i, i)];
  }
  return 0;
}
int main() {
  int cnt = 0;
  for (int i = 0; i < 6; i++) mp[s[i]] = i + 1;
  while (cin >> h[cnt]) cnt++;
  bool f1 = 0, f2 = 0;
  for (int i = 0; i < cnt; i++) {
    a[i] = get_s(h[i]);
    if (!a[i]) return 0 * puts("NO");
    f1 |= a[i] & 1, f2 |= ~a[i] & 1;
  }
  if (cnt == 1) return 0 * puts("YES");
  if (f1 && f2) return 0 * puts("NO");
  for (int i = 0; i < cnt; i++) (a[i] += 1) >>= 1;
  int p = 0;
  while (p < cnt - 1 && a[p] == a[p + 1] && a[p] == 1) p++;
  if (a[p] == 1)
    p++;
  else if (a[p] == 3)
    return 0 * puts("NO");
  if (a[p] != 2)
    return 0 * puts("NO");
  else
    p++;
  while (p < cnt)
    if (a[p++] != 3) return 0 * puts("NO");
  puts("YES");
  return 0;
}
