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