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