#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
const int INF = 2e9;
int n, cnt = 0, cnt1 = 0;
string s;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  int cnt1, cnt2;
  cnt1 = cnt2 = 0;
  for (int i = 1; i < n; ++i) {
    if (s[i] == 'F' && s[i - 1] == 'S') cnt2++;
    if (s[i] == 'S' && s[i - 1] == 'F') cnt1++;
  }
  if (cnt2 > cnt1) {
    cout << "YES";
  } else
    cout << "NO";
  return 0;
}
