#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string str;
  cin >> n >> str;
  if (*str.begin() == 'S' && *(str.end() - 1) == 'F')
    cout << "YES";
  else
    cout << "NO";
}
