#include <bits/stdc++.h>
using namespace std;
inline long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
inline long long int fast_pow(long long int a, long long int b,
                              long long int mod) {
  long long int res = 1;
  a %= mod;
  while (b > 0) {
    if (b & 1) res = res * a % mod;
    b >>= 1;
    a = a * a % mod;
  }
  return res;
}
inline bool isPrime(long long int a) {
  for (long long int i = 2; i * i <= a; i++)
    if (a % i == 0) return 0;
  return 1;
}
int adjFlag, nounFlag, verbsFlag, maleFlag, femaleFlag, flag, done, cnt = 1;
string s, ss;
set<string> adjective, verbs, nouns, males, females;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  adjective.insert("lios"), adjective.insert("liala");
  nouns.insert("etr"), nouns.insert("etra");
  verbs.insert("initis"), verbs.insert("inites");
  males.insert("lios"), males.insert("etr"), males.insert("initis");
  females.insert("liala"), females.insert("etra"), females.insert("inites");
  getline(cin, s);
  for (int i = 0; i < s.size(); i++)
    if (s[i] == ' ') cnt++;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == ' ') {
      ss = "";
      if (done == 0) {
        flag = 1;
        break;
      }
      done = 0;
      continue;
    }
    if (done) continue;
    ss = s[i] + ss;
    if (femaleFlag == 0 && females.find(ss) != females.end())
      femaleFlag = 1, done = 1;
    if (maleFlag == 0 && males.find(ss) != males.end()) maleFlag = 1, done = 1;
    if (verbs.find(ss) != verbs.end()) {
      verbsFlag = 1;
      done = 1;
      if (adjFlag || nounFlag) {
        flag = 1;
        break;
      }
    } else if (nouns.find(ss) != nouns.end()) {
      if (nounFlag) {
        flag = 1;
        break;
      }
      nounFlag = 1;
      done = 1;
      if (adjFlag) {
        flag = 1;
        break;
      }
    } else if (adjective.find(ss) != adjective.end()) {
      adjFlag = 1;
      done = 1;
      if (nounFlag == 0) {
        flag = 1;
        break;
      }
    }
  }
  if (cnt == 1) {
    if (adjFlag || nounFlag || verbsFlag)
      cout << "YES\n";
    else
      cout << "NO\n";
    return 0;
  }
  if (nounFlag == 0)
    cout << "NO\n";
  else if (flag || (femaleFlag && maleFlag))
    cout << "NO\n";
  else
    cout << "YES\n";
  return 0;
}
