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