#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a;
  cin >> a;
  string b;
  cin >> b;
  if (b[0] == 'S' and b[a - 1] == 'F') {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
