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