#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x = 0, y = 0;
  scanf("%d\n", &n);
  char a[n];
  gets(a);
  for (int i = 1; i < n; i++) {
    if (a[i - 1] == 'S' && a[i] == 'F') x++;
    if (a[i - 1] == 'F' && a[i] == 'S') y++;
  }
  if (x > y)
    cout << "YES";
  else
    cout << "NO";
}
