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