#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int good = 0;
  int bad = 0;
  string input;
  cin >> n;
  cin >> input;
  for (int var = 0; var < n - 1; var++) {
    if (input.at(var) == 'S' && input.at(var + 1) == 'F')
      good++;
    else if (input.at(var) == 'F' && input.at(var + 1) == 'S')
      bad++;
  }
  if (good > bad)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
