#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long long inf = 1e9;
const int MAXM = 6100 + 2;
const int MAXN = 1e3 + 4;
int main() {
  int n, i, j, k;
  string s;
  cin >> n >> s;
  int cnt1 = 0, cnt2 = 0;
  for (int i = 1; i < n; i++) {
    if (s[i] == 'F' and s[i - 1] == 'S') cnt1++;
    if (s[i] == 'S' and s[i - 1] == 'F') cnt2++;
  }
  if (cnt1 > cnt2) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
