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