#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int sum = 0;
int sex, flag = 0;
string word[11] = {"lios", "liala", "etr", "etra", "initis", "inites"};
inline int is_adj(string s) {
  string ss, sss;
  for (int i = s.length() - 4; i < s.length(); ++i) {
    ss += s[i];
    if (ss == word[0]) return 2;
  }
  for (int i = s.length() - 5; i < s.length(); ++i) {
    sss += s[i];
    if (sss == word[1]) return 3;
  }
  return 0;
}
inline int is_n(string s) {
  string ss, sss;
  for (int i = s.length() - 3; i < s.length(); ++i) {
    ss += s[i];
    if (ss == word[2]) return 4;
  }
  for (int i = s.length() - 4; i < s.length(); ++i) {
    sss += s[i];
    if (sss == word[3]) return 5;
  }
  return 0;
}
inline int is_v(string s) {
  string ss;
  for (int i = s.length() - 6; i < s.length(); ++i) {
    ss += s[i];
    if (ss == word[4]) return 6;
    if (ss == word[5]) return 7;
  }
  return 0;
}
inline int check_sex(string s) {
  if (is_adj(s)) return is_adj(s) % 2 + 1;
  if (is_n(s)) return is_n(s) % 2 + 1;
  if (is_v(s)) return is_v(s) % 2 + 1;
  return 0;
}
inline int ok(string s) {
  if (is_adj(s))
    return is_adj(s);
  else if (is_n(s))
    return is_n(s);
  else if (is_v(s))
    return is_v(s);
}
inline void input() {
  puts("NO");
  exit(0);
}
inline bool all_adj() {
  if (v.size() == 1) return false;
  if (sex == 1)
    for (int i = 0; i < v.size(); ++i) {
      if (v[i] != 0) return false;
    }
  else
    for (int i = 0; i < v.size(); ++i) {
      if (v[i] != 1) return false;
    }
  return true;
}
inline bool all_v() {
  if (v.size() == 1) return false;
  if (sex == 1)
    for (int i = 0; i < v.size(); ++i) {
      if (v[i] != 4) return false;
    }
  else
    for (int i = 0; i < v.size(); ++i) {
      if (v[i] != 5) return false;
    }
  return true;
}
int main() {
  string s;
  cin >> s;
  if (check_sex(s)) {
    if (is_adj(s)) {
      flag = is_adj(s);
      v.push_back(is_adj(s) - 2);
    } else if (is_n(s)) {
      flag = is_n(s);
      v.push_back(is_n(s) - 2);
    } else if (is_v(s)) {
      flag = is_v(s);
      v.push_back(is_v(s) - 2);
    }
  }
  if (flag % 2 == 0)
    sex = 1;
  else
    sex = 2;
  if (!flag) {
    puts("NO");
    exit(0);
  }
  while (cin >> s) {
    if (!check_sex(s)) input();
    if (check_sex(s) != sex) input();
    v.push_back(ok(s) - 2);
  }
  if (all_adj() || all_v()) input();
  if (sex == 1)
    for (int i = 0; i < v.size() - 1; ++i) {
      if (v[i] == 0 && v[i + 1] == 4) input();
      if (v[i] == 2 && v[i + 1] == 0) input();
      if (v[i] == 2 && v[i + 1] == 2) input();
      if (v[i] == 4 && v[i + 1] == 0) input();
      if (v[i] == 4 && v[i + 1] == 2) input();
    }
  if (sex == 2)
    for (int i = 0; i < v.size() - 1; ++i) {
      if (v[i] == 1 && v[i + 1] == 5) input();
      if (v[i] == 3 && v[i + 1] == 1) input();
      if (v[i] == 3 && v[i + 1] == 3) input();
      if (v[i] == 5 && v[i + 1] == 1) input();
      if (v[i] == 5 && v[i + 1] == 3) input();
    }
  puts("YES");
  return 0;
}
