#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 5;
int32_t main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int x = 0, y = 0;
  for (int i = 1; i < n; i++) {
    if (s[i - 1] == 'F' && s[i] == 'S') {
      y++;
    }
    if (s[i - 1] == 'S' && s[i] == 'F') {
      x++;
    } else {
      continue;
    }
  }
  if (x > y) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
