#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  scanf("%d", &n);
  cin >> s;
  int c = 0;
  int f = 0;
  for (int i = 1; i < s.size(); i++) {
    char ch = s[i];
    if (ch == s[i - 1])
      continue;
    else if (ch == 'F')
      f++;
    else if (ch == 'S')
      c++;
  }
  if (f <= c)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
