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