#include <bits/stdc++.h>
using namespace std;
const int M = 5e5 + 5, MOD = 1e9 + 7;
int a[] = {1, 5, 10, 20, 100};
int main() {
  int n;
  scanf("%d", &n);
  string s;
  cin >> s;
  int cnt = 0, cnt2 = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'S' && s[i + 1] == 'F') cnt++;
    if (s[i] == 'F' && s[i + 1] == 'S') cnt2++;
  }
  if (cnt > cnt2)
    puts("YES");
  else
    puts("NO");
}
