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