#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  int c = 0, k = 0;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'S' && s[i + 1] == 'F') {
      c++;
    } else if (s[i + 1] == 'S' && s[i] == 'F')
      k++;
  }
  if (c > k)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
