#include <bits/stdc++.h>
using namespace std;
int main() {
  int days, i, SF = 0, FS = 0;
  char location1 = '\0', location2 = '\0';
  cin >> days;
  for (i = 1; i <= days; i++) {
    cin >> location2;
    if (location1 == 'S' && location2 == 'F') SF++;
    if (location1 == 'F' && location2 == 'S') FS++;
    location1 = location2;
  }
  if (SF > FS)
    cout << " YES " << endl;
  else
    cout << " NO " << endl;
  return 0;
}
