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