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