#include <bits/stdc++.h>
using namespace std;
int N;
string str;
int main() {
  cin >> N;
  cin >> str;
  int ans1 = 0;
  int ans2 = 0;
  for (int i = 1; i < N; i++) {
    if (str[i] == 'S' && str[i - 1] == 'F') ans1++;
    if (str[i] == 'F' && str[i - 1] == 'S') ans2++;
  }
  cout << (ans2 > ans1 ? "YES" : "NO") << endl;
  return (0);
}
