#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  getchar();
  string str;
  getline(cin, str);
  int numxi = 0, numjiu = 0;
  char a, b;
  for (int i = 0; i < str.length(); i++) {
    a = str[i];
    b = str[i + 1];
    if (b == '\0') break;
    if (a == 'S' && a != b)
      numxi++;
    else if (a == 'F' && a != b)
      numjiu++;
  }
  if (numxi > numjiu)
    cout << "YES";
  else
    cout << "NO";
}
