#include <bits/stdc++.h>
using namespace std;
string input;
vector<string> v;
void transformInput() {
  string s = "";
  for (int i = 0; i < input.size(); i++) {
    if (input[i] == ' ') {
      v.push_back(s);
      s = "";
    } else {
      s += input[i];
    }
  }
  v.push_back(s);
  return;
}
bool checkFeminine() {
  bool adj = false, verb = false, noun = false;
  for (int i = 0; i < v.size(); i++) {
    string word = "zzzzzz";
    word += v[i];
    int wordSize = word.size();
    if (word[wordSize - 5] == 'l' && word[wordSize - 4] == 'i' &&
        word[wordSize - 3] == 'a' && word[wordSize - 2] == 'l' &&
        word[wordSize - 1] == 'a') {
      if (verb || noun)
        return false;
      else
        adj = true;
    } else if (word[wordSize - 4] == 'e' && word[wordSize - 3] == 't' &&
               word[wordSize - 2] == 'r' && word[wordSize - 1] == 'a') {
      if (verb || noun)
        return false;
      else
        adj = true, noun = true;
    } else if (word[wordSize - 6] == 'i' && word[wordSize - 5] == 'n' &&
               word[wordSize - 4] == 'i' && word[wordSize - 3] == 't' &&
               word[wordSize - 2] == 'e' && word[wordSize - 1] == 's') {
      verb = true;
    } else
      return false;
  }
  if (adj && verb && (!noun)) return false;
  if (v.size() > 1) {
    if (noun & adj) return true;
    if (noun && verb) return true;
    return false;
  }
  return true;
}
bool checkMasculine() {
  bool adj = false, verb = false, noun = false;
  for (int i = 0; i < v.size(); i++) {
    string word = "zzzzzz";
    word += v[i];
    int wordSize = word.size();
    if (word[wordSize - 4] == 'l' && word[wordSize - 3] == 'i' &&
        word[wordSize - 2] == 'o' && word[wordSize - 1] == 's') {
      if (verb || noun)
        return false;
      else
        adj = true;
    } else if (word[wordSize - 3] == 'e' && word[wordSize - 2] == 't' &&
               word[wordSize - 1] == 'r') {
      if (verb || noun)
        return false;
      else
        adj = true, noun = true;
    } else if (word[wordSize - 6] == 'i' && word[wordSize - 5] == 'n' &&
               word[wordSize - 4] == 'i' && word[wordSize - 3] == 't' &&
               word[wordSize - 2] == 'i' && word[wordSize - 1] == 's') {
      verb = true;
    } else
      return false;
  }
  if (adj && verb && (!noun)) return false;
  if (v.size() > 1) {
    if (noun & adj) return true;
    if (noun && verb) return true;
    return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  getline(cin, input);
  transformInput();
  bool isFeminine = true, isMasculine = true;
  isFeminine = checkFeminine();
  isMasculine = checkMasculine();
  if ((!isFeminine) && (!isMasculine))
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
