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