#include <bits/stdc++.h>
using namespace std;
const long long mod = (long long)1e9 + 7;
long long n, q, k;
char a[105];
int main() {
  cin >> n >> a;
  for (int i = 0; i < n - 1; i++) {
    if (a[i] == 'S' && a[i + 1] == 'F')
      q++;
    else if (a[i] == 'F' && a[i + 1] == 'S')
      k++;
  }
  if (q > k)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
