#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
const int inf = (int)1e9;
const int MAX_N = 1000 + 100;
pair<long long, long long> get_info(string s) {
  reverse(s.begin(), s.end());
  if (s.find("soil") == 0) return pair<long long, long long>(1, -1);
  if (s.find("alail") == 0) return pair<long long, long long>(0, -1);
  if (s.find("rte") == 0) return pair<long long, long long>(1, 0);
  if (s.find("arte") == 0) return pair<long long, long long>(0, 0);
  if (s.find("sitini") == 0) return pair<long long, long long>(1, 1);
  if (s.find("setini") == 0) return pair<long long, long long>(0, 1);
  return pair<long long, long long>(1000, 0);
}
vector<string> v;
int main() {
  string s;
  while (cin >> s) v.push_back(s);
  if (((int)v.size()) == 1) {
    cout << (get_info(v[0]).first == 1000 ? "NO" : "YES") << endl;
    return 0;
  }
  int i;
  int last = -1, gen = -1;
  for (i = 0; i < ((int)v.size()); i++) {
    pair<long long, long long> p = get_info(v[i]);
    if (p.first == 1000) break;
    if (gen != -1 && gen != p.first) break;
    gen = p.first;
    if (last == -1 && p.second == 1) break;
    if (last == 0 && p.second != 1) break;
    if (last == 1 && p.second != 1) break;
    last = p.second;
  }
  if (last == -1) i = 0;
  cout << (i == ((int)v.size()) ? "YES" : "NO") << endl;
  return 0;
}
