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