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