#include <bits/stdc++.h>
using namespace std;
const long long M = 5005;
const int MOD = 998244353;
const int MX = 3e5 + 5;
const long long INF = 1e18;
const long double PI = acos((long double)-1);
void msm() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
}
int prime(long long x);
int sol();
int main() {
  msm();
  bool isT = 0;
  if (isT) {
    long long t;
    cin >> t;
    ;
    while (t--) {
      sol();
      cout << "\n";
    }
    return 0;
  }
  sol();
  return 0;
}
int sol() {
  long long x;
  cin >> x;
  ;
  string s;
  cin >> s;
  long long yes = 0, no = 0;
  for (long long i = (0); i < ((long long)s.size()); ++i) {
    if (s[i] == 'S' and s[i + 1] == 'F')
      yes++;
    else if (s[i] == 'F' and s[i + 1] == 'S')
      no++;
  }
  yes > no ? cout << "YES" : cout << "NO";
  cout << "\n";
  ;
  return 0;
}
