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