#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, c = 0;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n - 1; ++i) {
    if (s[i] == 'F' and s[i + 1] == 'S') c--;
    if (s[i] == 'S' and s[i + 1] == 'F') c++;
  }
  if (c > 0)
    cout << "YES\n";
  else
    cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
