#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zero-upper")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("Ofast")
using namespace std;
const long double pi = acos(-1);
const unsigned long long int M = LLONG_MAX, N = 1e7 + 5, INF = 1e18;
vector<string> sentence;
string second, t = "";
long long int adj, noun, verb, mg, fg;
vector<char> order{'a'};
bool is = true, vw = true;
bool madj(string s) {
  if ((long long int)(s).size() >= 4 &&
      s.substr((long long int)(s).size() - 4, 4) == "lios")
    return true;
  return false;
}
bool fadj(string s) {
  if ((long long int)(s).size() >= 5 &&
      s.substr((long long int)(s).size() - 5, 5) == "liala")
    return true;
  return false;
}
bool mnoun(string s) {
  if ((long long int)(s).size() >= 3 &&
      s.substr((long long int)(s).size() - 3, 3) == "etr")
    return true;
  return false;
}
bool fnoun(string s) {
  if ((long long int)(s).size() >= 4 &&
      s.substr((long long int)(s).size() - 4, 4) == "etra")
    return true;
  return false;
}
bool mverb(string s) {
  if ((long long int)(s).size() >= 6 &&
      s.substr((long long int)(s).size() - 6, 6) == "initis")
    return true;
  return false;
}
bool fverb(string s) {
  if ((long long int)(s).size() >= 6 &&
      s.substr((long long int)(s).size() - 6, 6) == "inites")
    return true;
  return false;
}
void solve() {
  getline(cin, second);
  for (long long int i = 0; i < (long long int)(second).size(); i++) {
    if (second[i] == ' ') {
      sentence.push_back(t);
      t = "";
    } else {
      t += second[i];
    }
  }
  sentence.push_back(t);
  for (auto x : sentence) {
    if (madj(x)) {
      order.push_back('a');
      mg++;
      adj++;
    } else if (fadj(x)) {
      order.push_back('a');
      fg++;
      adj++;
    } else if (mnoun(x)) {
      order.push_back('n');
      mg++;
      noun++;
    } else if (fnoun(x)) {
      order.push_back('n');
      fg++;
      noun++;
    } else if (mverb(x)) {
      order.push_back('v');
      mg++;
      verb++;
    } else if (fverb(x)) {
      order.push_back('v');
      fg++;
      verb++;
    } else {
      vw = false;
    }
  }
  char p, c;
  c = p = order.front();
  for (auto x : order) {
    c = x;
    if (((c == 'a') && (p != 'a'))) {
      is = false;
      break;
    } else if (((c == 'n') && !(p == 'a' || p == 'n'))) {
      is = false;
      break;
    } else if (((c == 'v') && !(p == 'v' || p == 'n'))) {
      is = false;
      break;
    }
    p = c;
  }
  if (noun == 1 && adj >= 0 && verb >= 0 && is && vw) {
    if ((mg == 0 && fg != 0) || (mg != 0 && fg == 0)) {
      cout << "YES"
           << "\n";
      return;
    }
  } else if (noun + adj + verb == 1 && vw) {
    cout << "YES"
         << "\n";
    return;
  }
  cout << "NO"
       << "\n";
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
