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