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