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