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