#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, SF, FS;
  SF = FS = 0;
  string flights;
  cin >> n >> flights;
  for (int i = 0; i < flights.size() - 1; i++) {
    if (flights[i] == 'S' && flights[i + 1] == 'F') {
      SF++;
    } else if (flights[i] == 'F' && flights[i + 1] == 'S') {
      FS++;
    }
  }
  if (SF > FS) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
