#include <bits/stdc++.h>
using namespace std;
long long n, c1, c2;
string s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  cin >> s;
  long long l = s.size();
  for (long long i = 0; i < l - 1; i++) {
    if (s[i] == 'S' && s[i + 1] == 'F') c1++;
    if (s[i] == 'F' && s[i + 1] == 'S') c2++;
  }
  if (c1 > c2)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
