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