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