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