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