#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int a = 0, b = 0;
  for (int i = 1; i < n; i++) {
    if (s[i - 1] == 'S' && s[i] == 'F')
      ++a;
    else if (s[i - 1] == 'F' && s[i] == 'S')
      ++b;
  }
  if (a > b)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
