#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int seattle_trips = 0;
  int sf_trips = 0;
  for (int i = 1; i < n; i++) {
    if (s[i] == 'F' && s[i - 1] == 'S')
      sf_trips++;
    else if (s[i] == 'S' && s[i - 1] == 'F')
      seattle_trips++;
  }
  if (sf_trips > seattle_trips)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
