#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int some, awesome, n, i;
  char arr[102];
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  some = awesome = 0;
  for (i = 0; i < n; i++) {
    if (arr[i] == 'S' && arr[i + 1] == 'F') {
      some++;
    } else if (arr[i] == 'F' && arr[i + 1] == 'S') {
      awesome++;
    }
  }
  if (some > awesome) {
    cout << "YES"
         << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
  return 0;
}
