#include <bits/stdc++.h>
using namespace std;
char ch[100010];
int cnt_adj, cnt_n, cnt_v;
int gender = -1;
int check() {
  int n = strlen(ch), rtn;
  if (!strncmp(ch + n - 3, "etr", 3))
    rtn = 3;
  else if (!strncmp(ch + n - 4, "lios", 4))
    rtn = 1;
  else if (!strncmp(ch + n - 4, "etra", 4))
    rtn = 4;
  else if (!strncmp(ch + n - 5, "liala", 5))
    rtn = 2;
  else if (!strncmp(ch + n - 6, "initis", 6))
    rtn = 5;
  else if (!strncmp(ch + n - 6, "inites", 6))
    rtn = 6;
  else
    return -1;
  return rtn;
}
int main() {
  while (scanf("%s", ch) != EOF) {
    int p = check();
    if (gender == -1)
      gender = p % 2;
    else if (p % 2 != gender)
      p = -1;
    if (p >= 1 && p <= 2) {
      if (cnt_n || cnt_v)
        p = -1;
      else
        cnt_adj++;
    } else if (p >= 3 && p <= 4) {
      if (cnt_n || cnt_v)
        p = -1;
      else
        cnt_n++;
    } else if (p >= 5 && p <= 6) {
      if (!cnt_n && cnt_adj)
        p = -1;
      else
        cnt_v++;
    }
    if (p == -1) {
      printf("NO\n");
      return 0;
    }
  }
  if (!cnt_n && ((cnt_v > 1) || (cnt_adj > 1)))
    printf("NO\n");
  else
    printf("YES\n");
  return 0;
}
