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