#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  map<string, long long> m;
  for (long long i = 0; i < s.size() - 1; i++) {
    string str = "";
    str += s[i];
    str += s[i + 1];
    m[str]++;
  }
  if (m["SF"] > m["FS"])
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
