#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
void ff(string s, int &ch, int &r) {
  if (s.size() >= 4 && s.substr(s.length() - 4, 4) == "lios")
    ch = 1, r = 1;
  else if (s.size() >= 5 && s.substr(s.length() - 5, 5) == "liala")
    ch = 1, r = 2;
  else if (s.size() >= 3 && s.substr(s.length() - 3, 3) == "etr")
    ch = 2, r = 1;
  else if (s.size() >= 4 && s.substr(s.length() - 4, 4) == "etra")
    ch = 2, r = 2;
  else if (s.size() >= 6 && s.substr(s.length() - 6, 6) == "initis")
    ch = 3, r = 1;
  else if (s.size() >= 6 && s.substr(s.length() - 6, 6) == "inites")
    ch = 3, r = 2;
  else
    ch = 0, r = 0;
}
int main() {
  vector<string> v;
  string s;
  while (cin >> s) v.push_back(s);
  vector<pair<int, int> > a(v.size());
  for (int i = 0; i < v.size(); ++i) {
    int ch, r;
    ff(v[i], ch, r);
    if (ch == 0) {
      cout << "NO" << endl;
      return 0;
    }
    a[i].first = ch;
    a[i].second = r;
  }
  if (a.size() == 1) {
    cout << "YES" << endl;
    return 0;
  }
  int rr = a[0].second;
  for (int i = 1; i < a.size(); ++i)
    if (a[i].second != rr) {
      cout << "NO" << endl;
      return 0;
    }
  int cnt1 = 0;
  int cnt2 = 0;
  int cnt3 = 0;
  int pos = 0;
  for (; pos < a.size(); ++pos) {
    if (a[pos].first == 1)
      ++cnt1;
    else
      break;
  }
  for (; pos < a.size(); ++pos) {
    if (a[pos].first == 2)
      ++cnt2;
    else
      break;
  }
  for (; pos < a.size(); ++pos) {
    if (a[pos].first == 3)
      ++cnt3;
    else
      break;
  }
  if (cnt1 + cnt2 + cnt3 == a.size() && cnt2 == 1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
