#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<string> vs;
  stringstream ss;
  string s, t;
  getline(cin, s);
  ss << s;
  while (!ss.eof() and ss >> t) {
    vs.push_back(t);
  }
  int adj = 0;
  int noun = 0;
  int verb = 0;
  int mas = 0;
  int fem = 0;
  bool flag = true;
  for (int i = 0; i < vs.size(); i++) {
    bool check = false;
    if (vs[i].length() >= 4) {
      if (vs[i].substr(vs[i].length() - 4, 4) == "lios") {
        if (fem == 1 or noun > 0 or verb > 0) {
          flag = false;
          break;
        }
        mas = 1;
        adj++;
        check = true;
      }
    }
    if (vs[i].length() >= 5) {
      if (vs[i].substr(vs[i].length() - 5, 5) == "liala") {
        if (mas == 1 or noun > 0 or verb > 0) {
          flag = false;
          break;
        }
        fem = 1;
        adj++;
        check = true;
      }
    }
    if (vs[i].length() >= 3) {
      if (vs[i].substr(vs[i].length() - 3, 3) == "etr") {
        if (fem == 1 or verb > 0 or noun > 0) {
          flag = false;
          break;
        }
        mas = 1;
        noun++;
        check = true;
      }
    }
    if (vs[i].length() >= 4) {
      if (vs[i].substr(vs[i].length() - 4, 4) == "etra") {
        if (mas == 1 or verb > 0 or noun > 0) {
          flag = false;
          break;
        }
        fem = 1;
        noun++;
        check = true;
      }
    }
    if (vs[i].length() >= 6) {
      if (vs[i].substr(vs[i].length() - 6, 6) == "initis") {
        if (fem == 1) {
          flag = false;
          break;
        }
        mas = 1;
        verb++;
        check = true;
      }
    }
    if (vs[i].length() >= 6) {
      if (vs[i].substr(vs[i].length() - 6, 6) == "inites") {
        if (mas == 1) {
          flag = false;
          break;
        }
        fem = 1;
        verb++;
        check = true;
      }
    }
    if (check == false) {
      flag = false;
      break;
    }
  }
  if (flag and vs.size() != 1) {
    if (noun == 0) {
      flag = false;
    }
  }
  if (flag) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
