#include <bits/stdc++.h>
using namespace std;
long a[200000], b[200000], qq;
vector<string> v;
string st, zr;
bool pm(string st) {
  if (st.size() < 4) return false;
  zr = "lios";
  for (int j = 1; j <= 4; j++)
    if (st[st.size() - j] != zr[4 - j]) return false;
  return true;
}
bool pz(string st) {
  if (st.size() < 5) return false;
  zr = "liala";
  for (int j = 1; j <= 5; j++)
    if (st[st.size() - j] != zr[5 - j]) return false;
  return true;
}
bool sm(string st) {
  if (st.size() < 3) return false;
  zr = "etr";
  for (int j = 1; j <= 3; j++)
    if (st[st.size() - j] != zr[3 - j]) return false;
  return true;
}
bool sz(string st) {
  if (st.size() < 4) return false;
  zr = "etra";
  for (int j = 1; j <= 4; j++)
    if (st[st.size() - j] != zr[4 - j]) return false;
  return true;
}
bool gm(string st) {
  if (st.size() < 6) return false;
  zr = "initis";
  for (int j = 1; j <= 6; j++)
    if (st[st.size() - j] != zr[6 - j]) return false;
  return true;
}
bool gz(string st) {
  if (st.size() < 6) return false;
  zr = "inites";
  for (int j = 1; j <= 6; j++)
    if (st[st.size() - j] != zr[6 - j]) return false;
  return true;
}
int main() {
  while (cin >> st) {
    v.push_back(st);
  }
  for (int i = 0; i < v.size(); i++) {
    if (pm(v[i])) {
      a[i] = 1;
      b[i] = 1;
    }
    if (pz(v[i])) {
      a[i] = 1;
      b[i] = 2;
    }
    if (sm(v[i])) {
      a[i] = 2;
      b[i] = 1;
    }
    if (sz(v[i])) {
      a[i] = 2;
      b[i] = 2;
    }
    if (gm(v[i])) {
      a[i] = 3;
      b[i] = 1;
    }
    if (gz(v[i])) {
      a[i] = 3;
      b[i] = 2;
    }
  }
  qq = b[0];
  if (qq == 0) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 1; i < v.size(); i++) {
    if (b[i] != qq) {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (v.size() == 1) {
    cout << "YES" << endl;
  } else {
    qq = 0;
    while (a[qq] == 1) {
      ++qq;
    }
    if (qq >= v.size() || a[qq] != 2) {
      cout << "NO" << endl;
      return 0;
    }
    ++qq;
    if (a[qq] == 2) {
      cout << "NO" << endl;
      return 0;
    }
    while (a[qq] == 3) ++qq;
    if (qq != v.size()) {
      cout << "NO" << endl;
      return 0;
    } else
      cout << "YES" << endl;
  }
  cin.get();
  cin.get();
  return 0;
}
