#include <bits/stdc++.h>
using namespace std;
const int MM = 1200000;
long long int m, n, k, p1, p2, p3, p, f, a[MM];
string s, s1, s2;
int main() {
  cin >> n;
  cin >> s;
  p = 0;
  for (int i = 0; i < n - 1; i++) {
    p += (s[i] == 'S' && s[i + 1] == 'F');
    p -= (s[i] == 'F' && s[i + 1] == 'S');
  }
  if (p > 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
