#include <bits/stdc++.h>
using namespace std;
int n;
char a[105];
int main() {
  scanf("%d%s", &n, a + 1);
  int sf = 0, fs = 0;
  for (int i = 1; i < n; i++) {
    if (a[i] == 'S' && a[i + 1] == 'F') sf++;
    if (a[i] == 'F' && a[i + 1] == 'S') fs++;
  }
  printf(sf > fs ? "YES\n" : "NO\n");
  return 0;
}
