#include <bits/stdc++.h>
using namespace std;
pair<char, char> type(string& str) {
  int p = str.rfind("lios");
  int sz = str.size();
  if (p >= 0 && p == sz - 4) return make_pair('M', 'A');
  p = str.rfind("liala");
  if (p >= 0 && p == sz - 5) return make_pair('F', 'A');
  p = str.rfind("etr");
  if (p >= 0 && p == sz - 3) return make_pair('M', 'N');
  p = str.rfind("etra");
  if (p >= 0 && p == sz - 4) return make_pair('F', 'N');
  p = str.rfind("initis");
  if (p >= 0 && p == sz - 6) return make_pair('M', 'V');
  p = str.rfind("inites");
  if (p >= 0 && p == sz - 6) return make_pair('F', 'V');
  return make_pair(-1, -1);
}
int main() {
  ios::sync_with_stdio(false);
  string str;
  getline(cin, str);
  istringstream iss(str);
  iss >> str;
  pair<char, char> p = type(str);
  char sm = p.first;
  char t = p.second;
  bool nent = true;
  if (t == -1) {
    cout << "NO\n";
    return 0;
  }
  bool hasN = t == 'N';
  while (iss >> str) {
    nent = false;
    p = type(str);
    if (p.first != sm) {
      cout << "NO\n";
      return 0;
    }
    if (t == 'A' && p.second != 'A' && p.second != 'N') {
      cout << "NO\n";
      return 0;
    }
    if (t == 'N' && p.second != 'V') {
      cout << "NO\n";
      return 0;
    }
    if (t == 'V' && p.second != 'V') {
      cout << "NO\n";
      return 0;
    }
    t = p.second;
    if (t == 'N') hasN = true;
  }
  if (!nent && !hasN)
    cout << "NO\n";
  else
    cout << "YES\n";
  return 0;
}
