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