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