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