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