#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p, q;
  char a, t;
  cin >> n;
  t = 0;
  p = 0;
  q = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> a;
    if (a == 'F' && t == 'S')
      p += 1;
    else {
      if (a == 'S' && t == 'F') q += 1;
    }
    t = a;
  }
  if (p > q)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
