#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char arr[n];
  cin >> arr;
  int sf = 0, fs = 0;
  for (int i = 0; i < (n - 1); i++) {
    if (arr[i] == 'F' && arr[i + 1] == 'S') {
      fs++;
    } else if (arr[i] == 'S' && arr[i + 1] == 'F') {
      sf++;
    }
  }
  if (sf > fs) {
    cout << "YES" << std::endl;
  } else {
    cout << "NO" << std::endl;
  }
  return 0;
}
