#include <bits/stdc++.h>
using namespace std;
bool first = 1;
int gender;
int adj = 1;
bool ok = 0;
int gend(const string &x) {
  int len = x.size();
  if (len < 3) return -1;
  if (x.substr(len - 3) == "etr") return 2;
  if (len < 4) return -1;
  if (x.substr(len - 4) == "etra") return 10;
  if (x.substr(len - 4) == "lios") return 1;
  if (len < 5) return -1;
  if (x.substr(len - 5) == "liala") return 5;
  if (len < 6) return -1;
  if (x.substr(len - 6) == "inites") return 15;
  if (x.substr(len - 6) == "initis") return 3;
  return -1;
}
bool check(const string &x) {
  if (first) {
    first = 0;
    int thi = gend(x);
    if (thi == -1) return 0;
    if (thi % 5 == 0)
      gender = 0, thi /= 5;
    else
      gender = 1;
    adj = thi;
    if (adj == 2) ok = 1;
    return 1;
  }
  int thi = gend(x);
  int nowgender;
  if (thi == -1) return 0;
  if (thi % 5 == 0)
    nowgender = 0, thi /= 5;
  else
    nowgender = 1;
  if (nowgender != gender) return 0;
  switch (adj) {
    case 1: {
      if (thi == 2)
        adj = 2, ok = 1;
      else if (thi == 3)
        return 0;
      break;
    }
    case 2: {
      if (thi == 1 || thi == 2) return 0;
      if (thi == 3) adj = 3;
      break;
    }
    case 3: {
      if (thi != 3) return 0;
    }
  }
  return 1;
}
int main() {
  string x;
  int cnt = 0;
  while (cin >> x) {
    cnt++;
    if (!check(x)) {
      cout << "NO" << endl;
      return 0;
    }
  }
  if (ok || cnt == 1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
