#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, i, sf = 0, fs = 0;
  cin >> n;
  string s;
  cin >> s;
  for (i = 0; i < s.length() - 1; 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" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
