#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  string str;
  cin >> str;
  int k = 0;
  for (int i = 0; i < str.length() - 1; i++) {
    if (str[i] == 'S')
      if (str[i + 1] == 'F') k++;
    if (str[i] == 'F')
      if (str[i + 1] == 'S') k--;
  }
  if (k < 1)
    cout << "NO";
  else
    cout << "YES";
}
