#include <bits/stdc++.h>
using namespace std;
bool man(string s) {
  if (s.size() >= 6 && s.substr(0, 6) == "sitini") return 1;
  if (s.size() >= 4 && s.substr(0, 4) == "soil") return 1;
  if (s.size() >= 3 && s.substr(0, 3) == "rte") return 1;
  return 0;
}
int main() {
  string s;
  getline(cin, s);
  vector<string> vs;
  string tmp = "";
  for (long long i = 0; i < int(s.size()); i++) {
    if (isalpha(s[i]))
      tmp += s[i];
    else {
      vs.push_back(tmp);
      tmp = "";
    }
  }
  vs.push_back(tmp);
  vector<pair<long long, long long> > types;
  for (long long i = 0; i < vs.size(); i++) {
    string tmp = vs[i];
    reverse(tmp.begin(), tmp.end());
    pair<long long, long long> now;
    if (man(tmp)) {
      now.first = 0;
      if (tmp.size() >= 6 && tmp.substr(0, 6) == "sitini")
        now.second = 0;
      else if (tmp.size() >= 4 && tmp.substr(0, 4) == "soil")
        now.second = 1;
      else if (s.size() >= 3 && tmp.substr(0, 3) == "rte")
        now.second = 2;
      else {
        cout << "NO" << endl;
        return 0;
      }
    } else {
      now.first = 1;
      if (tmp.size() >= 6 && tmp.substr(0, 6) == "setini")
        now.second = 0;
      else if (tmp.size() >= 5 && tmp.substr(0, 5) == "alail")
        now.second = 1;
      else if (s.size() >= 4 && tmp.substr(0, 4) == "arte")
        now.second = 2;
      else {
        cout << "NO" << endl;
        return 0;
      }
    }
    types.push_back(now);
  }
  long long gender = -1;
  for (long long i = 0; i < types.size(); i++) {
    if (types[i].first != gender && gender != -1) {
      cout << "NO" << endl;
      return 0;
    }
    gender = types[i].first;
  }
  if (types.size() == 1) {
    cout << "YES" << endl;
    return 0;
  }
  bool isok = 1;
  bool start = 1;
  bool adj = 0;
  bool noun = 0;
  bool verb = 0;
  bool n = 0;
  for (long long i = 0; i < types.size(); i++) {
    if (start == 1) {
      if (types[i].second == 0) isok = 0;
    } else if (adj == 1) {
      if (types[i].second == 0) isok = 0;
    } else if (noun == 1) {
      if (types[i].second == 2 || types[i].second == 1) isok = 0;
    } else if (verb == 1) {
      if (types[i].second != 0) isok = 0;
    }
    if (types[i].second == 0) {
      verb = 1;
      start = 0;
      adj = 0;
      noun = 0;
    }
    if (types[i].second == 1) {
      adj = 1;
      start = 0;
      noun = 0;
      verb = 0;
    }
    if (types[i].second == 2) {
      noun = 1;
      start = 0;
      adj = 0;
      verb = 0;
      n = 1;
    }
  }
  if (!isok || !n) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
  return 0;
}
