#include <bits/stdc++.h>
int main() {
  char str[100];
  int i, j = 0, k, c = 0, c1 = 0, n;
  scanf("%d", &n);
  scanf("%s", str);
  k = strlen(str);
  for (i = 0; i < k - 1; i++) {
    if (str[i] == 'S' && str[i + 1] == 'F')
      c++;
    else if (str[i] == 'F' && str[i + 1] == 'S')
      c1++;
  }
  if (c1 < c)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
