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