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