#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  scanf("%d", &a);
  char arr[a];
  for (int i = 0; i < a; i++) {
    cin >> arr[i];
  }
  if (arr[0] == 'S' && arr[a - 1] == 'F') {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
