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