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