#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  int n;
  int S = 0, F = 0;
  string s;
  cin >> n >> s;
  for (size_t i = 1; i < s.size(); ++i) {
    if (s[i - 1] != s[i]) {
      if (s[i] == 'S') {
        ++S;
      } else {
        ++F;
      }
    }
  }
  cout << (F > S ? "YES" : "NO") << endl;
}
