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