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