#include <bits/stdc++.h>
using namespace std;
int n, ct, ctt;
string s;
char ch;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'F') {
      if (ch == 'S') ct++;
      ch = 'F';
    } else {
      if (ch == 'F') ctt++;
      ch = 'S';
    }
  }
  if (ct > ctt) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
