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