#include <bits/stdc++.h>
using namespace std;
int malenoun(char s[]) {
  int i, n = strlen(s);
  if (s[n - 1] == 'r' && s[n - 2] == 't' && s[n - 3] == 'e') return 1;
  return 0;
}
int femalenoun(char s[]) {
  int i, n = strlen(s);
  if (s[n - 1] == 'a' && s[n - 2] == 'r' && s[n - 3] == 't' && s[n - 4] == 'e')
    return 1;
  return 0;
}
int maleadj(char s[]) {
  int i, n = strlen(s);
  if (s[n - 1] == 's' && s[n - 2] == 'o' && s[n - 3] == 'i' && s[n - 4] == 'l')
    return 1;
  return 0;
}
int femaleadj(char s[]) {
  int i, n = strlen(s);
  if (s[n - 1] == 'a' && s[n - 2] == 'l' && s[n - 3] == 'a' &&
      s[n - 4] == 'i' && s[n - 5] == 'l')
    return 1;
  return 0;
}
int maleverb(char s[]) {
  int i, n = strlen(s);
  if (s[n - 1] == 's' && s[n - 2] == 'i' && s[n - 3] == 't' &&
      s[n - 4] == 'i' && s[n - 5] == 'n' && s[n - 6] == 'i')
    return 1;
  return 0;
}
int femaleverb(char s[]) {
  int i, n = strlen(s);
  if (s[n - 1] == 's' && s[n - 2] == 'e' && s[n - 3] == 't' &&
      s[n - 4] == 'i' && s[n - 5] == 'n' && s[n - 6] == 'i')
    return 1;
  return 0;
}
int main() {
  char s[100009];
  int mn = 0, fn = 0, fa = 0, ma = 0, mv = 0, fv = 0, flag = 1, i = 0,
      invalid = 0;
  while (scanf("%s", s) != EOF) {
    i++;
    if (maleadj(s)) {
      if (mn > 0 || mv > 0) flag = 0;
      ma++;
    } else if (femaleadj(s)) {
      if (fn > 0 || fv > 0) flag = 0;
      fa++;
    } else if (malenoun(s)) {
      if (mn) flag = 0;
      mn++;
    } else if (femalenoun(s)) {
      if (fn) flag = 0;
      fn++;
    } else if (maleverb(s)) {
      if (i != 0 && mn != 1) flag = 0;
      mv++;
    } else if (femaleverb(s)) {
      if (i != 0 && fn != 1) flag = 0;
      fv++;
    } else {
      invalid++;
      flag = 0;
    }
  }
  if (fn != 1 && mn != 1) flag = 0;
  if (mn) {
    if (fa > 0 || fn > 0 || fv > 0) flag = 0;
  }
  if ((ma > 1 || mv >= 1) && mn != 1) flag = 0;
  if (fn) {
    if (ma > 0 || mn > 0 || mv > 0) flag = 0;
  }
  if ((fa > 1 || fv > 1) && fn != 1) flag = 0;
  if (i == 1 && invalid == 0) flag = 1;
  if (!flag)
    printf("NO");
  else
    printf("YES");
  return 0;
}
