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