#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  string s;
  while (cin >> n >> s) {
    int a = 0;
    int b = 0;
    for (int i = 1; i < n; ++i) {
      if (s[i - 1] == 'S' && s[i] == 'F') a++;
      if (s[i - 1] == 'F' && s[i] == 'S') b++;
    }
    cout << (a > b ? "YES" : "NO") << '\n';
  }
  return 0;
}
