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