#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m, i, j, k, l, ans = 0, sum = 0, x, y, z, mn = 2e9,
                              a[100005] = {0}, flag = 0;
  string s;
  cin >> n;
  cin >> s;
  for (i = 0; i < s.size(); i++) {
    if ((i + 1) < n && s[i] == 'S' && s[i + 1] == 'F') {
      sum++;
    }
    if ((i + 1) < n && s[i] == 'F' && s[i + 1] == 'S') {
      ans++;
    }
  }
  if (sum > ans) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
