#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  char arr[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long c = 0;
  for (long long i = 0; i < n - 1; i++) {
    if (arr[i] == 'S' && arr[i + 1] == 'F')
      c++;
    else if (arr[i] == 'F' && arr[i + 1] == 'S')
      c--;
  }
  if (c > 0)
    cout << "YES"
         << "\n";
  else
    cout << "NO"
         << "\n";
  return 0;
}
