#include <bits/stdc++.h>
using namespace std;
deque<long long> dq;
map<long long, long long> make_pair;
set<long long> st;
vector<long long> vt;
long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m, x, y, i, j, k, p, f = 0, tc, cnt = 0, sum = 0, pro = 1,
                                    mi = 1e18, ma = -1e18;
  string str;
  char ch;
  double db;
  cin >> n;
  cin >> str;
  long long c1 = 0, c2 = 0;
  for (i = 0; i < n - 1; i++) {
    if (str[i] == 'S' && str[i + 1] == 'F') c1++;
    if (str[i] == 'F' && str[i + 1] == 'S') c2++;
  }
  if (c1 > c2)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
