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