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