#include <bits/stdc++.h>
using namespace std;
const int M = 200000;
map<string, int> mp;
struct Node {
  string s;
} node[M];
void init() {
  mp["lios"] = 1;
  mp["liala"] = 2;
  mp["etr"] = 3;
  mp["etra"] = 4;
  mp["initis"] = 5;
  mp["inites"] = 6;
}
int is_a(const string &s) {
  int n = s.size();
  string tmp;
  for (int i = n - 1; i >= 0; i--) {
    tmp = s[i] + tmp;
    if (tmp.size() >= 7) return 0;
    if (mp[tmp] == 1) return 1;
    if (mp[tmp] == 2) return 2;
  }
  return 0;
}
int is_n(const string &s) {
  int n = s.size();
  string tmp;
  for (int i = n - 1; i >= 0; i--) {
    tmp = s[i] + tmp;
    if (tmp.size() >= 7) return 0;
    if (mp[tmp] == 3) return 1;
    if (mp[tmp] == 4) return 2;
  }
  return 0;
}
int is_v(const string &s) {
  int n = s.size();
  string tmp;
  for (int i = n - 1; i >= 0; i--) {
    tmp = s[i] + tmp;
    if (tmp.size() >= 7) return 0;
    if (mp[tmp] == 5) return 1;
    if (mp[tmp] == 6) return 2;
  }
  return 0;
}
int main() {
  init();
  int cnt = 0;
  string s;
  while (cin >> s) {
    cnt++;
    node[cnt].s = s;
    char c = getchar();
    if (c == '\n') break;
  }
  if (cnt == 1) {
    if (is_n(node[1].s) || is_a(node[1].s) || is_v(node[1].s))
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
    return 0;
  }
  int num = 0;
  int idx;
  int xx;
  for (int i = 1; i <= cnt; i++) {
    if (is_n(node[i].s)) {
      xx = is_n(node[i].s);
      num++;
      if (num > 1) break;
      idx = i;
    }
  }
  if (num != 1)
    cout << "NO" << endl;
  else {
    bool flag = true;
    for (int i = 1; i < idx; i++) {
      int tt = is_a(node[i].s);
      if (tt != xx) {
        flag = false;
        break;
      }
    }
    if (flag) {
      for (int i = idx + 1; i <= cnt; i++) {
        int tt = is_v(node[i].s);
        if (tt != xx) {
          flag = false;
          break;
        }
      }
    }
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
