#include <bits/stdc++.h>
using namespace std;
string s;
int n, sf, fs;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == 'S' && s[i + 1] == 'F')
      ++sf;
    else if (s[i] == 'F' && s[i + 1] == 'S')
      ++fs;
  }
  if (sf > fs)
    cout << "YES";
  else
    cout << "NO";
}
