#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char s[110];
  scanf("%d", &n);
  scanf("%s", s);
  int cnt1 = 0, cnt2 = 0;
  for (int i = 1; i < n; i++) {
    if (s[i - 1] == 'S' && s[i] == 'F') cnt1++;
    if (s[i - 1] == 'F' && s[i] == 'S') cnt2++;
  }
  if (cnt1 > cnt2)
    puts("YES");
  else
    puts("NO");
  return 0;
}
