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