#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  char s1[3] = "FS";
  char s2[3] = "SF";
  int n, i = 0, cnt1 = 0, cnt2 = 0;
  cin >> n;
  cin >> s;
  while ((i = s.find(s1, i)) != -1) {
    i++;
    cnt1++;
  }
  i = 0;
  while ((i = s.find(s2, i)) != -1) {
    i++;
    cnt2++;
  }
  if (cnt1 < cnt2) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
