#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c = 0, x = 0;
  cin >> n;
  string s;
  cin >> s;
  (s[0] == 'S' and s[n - 1] == 'F') ? cout << "YES" << endl
                                    : cout << "NO" << endl;
  return 0;
}
