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