#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  char last = s[0];
  int sCount = 0, fCount = 0;
  for (char c : s) {
    if (c != last) {
      last = c;
      if (c == 'S')
        sCount++;
      else
        fCount++;
    }
  }
  cout << ((fCount > sCount) ? "YES" : "NO") << endl;
  return 0;
}
