#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
const int sz = 1e9;
const int SIZE = 2e18;
long long a, b, c, d, n, m, x, y, cnt, ans;
string s1, s2, s3, s4;
char ch1, ch2, ch3;
bool bb, bbb;
double db, db1;
map<int, int> mp, mpp;
set<int> st, sts;
pair<int, int> p[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> s1;
  if (s1[0] == 'S' && s1[n - 1] == 'F')
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
