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