#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int n;
  cin >> n;
  cin >> s;
  int a = 0, b = 0;
  for (int i = 1; i < s.size(); ++i) {
    if (s[i] != s[i - 1]) {
      a += s[i] == 'F';
      b += s[i] == 'S';
    }
  }
  puts(a > b ? "YES" : "NO");
  return 0;
}
