#include <bits/stdc++.h>
long long int mx = 1e18;
long long int mn = -1e18;
using namespace std;
long long int a[110];
long long int b[110];
vector<long long int> v;
int main() {
  long long int i, j, k, n, m, f, s, len, cnt = 0, ans;
  string str;
  cin >> n;
  cin >> str;
  f = s = 0;
  for (i = 1; i < n; i++) {
    if (str[i] != str[i - 1]) {
      if (str[i - 1] == 'F')
        f++;
      else
        s++;
    }
  }
  if (f < s) {
    cout << "YES" << endl;
  } else
    cout << "NO" << endl;
}
