#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, c = 0, d = 0;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'F' && s[i + 1] == 'S') {
      c++;
    } else if (s[i] == 'S' && s[i + 1] == 'F') {
      d++;
    }
  }
  if (d > c) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
