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