#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 10;
const int INF = 0x3f3f3f3f;
const double eps = 1e-9;
const int mod = 1e9 + 7;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    getchar();
    char s[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++;
      else if (s[i - 1] == 'F' && s[i] == 'S')
        cnt2++;
    }
    if (cnt1 > cnt2)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
