#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 7;
const long long INF = 1e18;
vector<long long> z;
int32_t main() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  long long sf = 0, fs = 0;
  for (long long i = 1; i <= n; i++) {
    if ((s[i - 1] == 'S') && (s[i] == 'F'))
      sf++;
    else if ((s[i - 1] == 'F') && (s[i] == 'S'))
      fs++;
  }
  if (sf > fs)
    cout << "YES";
  else
    cout << "NO";
}
