#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, f = 0, se = 0;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 1; i < n; i++) {
    if (s[i - 1] == 'F' and s[i] == 'S')
      f++;
    else if (s[i - 1] == 'S' and s[i] == 'F')
      se++;
  }
  if (se > f)
    puts("YES");
  else
    puts("NO");
  return 0;
}
