#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> g(string s) {
  long long n = s.size();
  if (n >= 3) {
    if (s.substr(n - 3, 3) == "etr") {
      return {2, 1};
    }
  }
  if (n >= 4) {
    if (s.substr(n - 4, 4) == "lios") return {1, 1};
    if (s.substr(n - 4, 4) == "etra") return {2, 2};
  }
  if (n >= 5) {
    if (s.substr(n - 5, 5) == "liala") return {1, 2};
  }
  if (n >= 6) {
    if (s.substr(n - 6, 6) == "initis") return {3, 1};
    if (s.substr(n - 6, 6) == "inites") return {3, 2};
  }
  return {-1, -1};
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  vector<string> vs;
  string s;
  while (cin >> s) {
    vs.push_back(s);
  }
  long long gender = 0;
  bool pos = true;
  long long a = 0, n = 0, v = 0;
  for (long long int i = 0; i < vs.size(); i++) {
    pair<long long int, long long int> p = g(vs[i]);
    if (p.second == -1) {
      pos = false;
      break;
    }
    if (gender == 0) {
      gender = p.second;
    }
    if (p.second != gender) {
      pos = false;
      break;
    }
    if (p.first == 1) {
      if (n + v == 0) {
        a++;
      } else {
        pos = false;
        break;
      }
    }
    if (p.first == 2) {
      if (v == 0)
        n++;
      else {
        pos = false;
        break;
      }
    }
    if (p.first == 3) {
      v++;
    }
  }
  if (n != 1 && n + a + v != 1) pos = false;
  if (!pos) {
    cout << "NO";
  } else {
    cout << "YES";
  }
  return 0;
}
