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