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