#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  string cmp[10];
  cmp[0] = "lios", cmp[1] = "liala", cmp[2] = "etr", cmp[3] = "etra",
  cmp[4] = "initis", cmp[5] = "inites";
  int mod = -1, cnt = 0;
  bool vis = false, ans = true, ans0 = true;
  while (cin >> s) {
    cnt++;
    for (int i = 0; i <= 6; i++) {
      if (i == 6) {
        ans0 = false;
        break;
      }
      if (s.length() < cmp[i].length()) continue;
      bool eq = true;
      for (int j = 0; j < cmp[i].length(); j++)
        if (cmp[i][j] != s[s.length() + j - cmp[i].length()]) eq = false;
      if (eq) {
        if (mod != -1 && i % 2 != mod) ans = false;
        mod = i % 2;
        if (i == 2 || i == 3) {
          if (vis) ans = false;
          vis = true;
        } else if (i == 0 || i == 1) {
          if (vis) ans = false;
        } else {
          if (!vis) ans = false;
        }
        break;
      }
    }
  }
  cout << (((cnt == 1 && ans0) || (ans && ans0 && vis)) ? "YES" : "NO") << endl;
  return 0;
}
