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