#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char a[n];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  if (a[1] == 'F') {
    cout << "NO\n";
  } else if (a[1] == a[n]) {
    cout << "NO\n";
  } else {
    cout << "YES\n";
  }
  return 0;
}
