#include <bits/stdc++.h>
int main() {
  int a, i;
  char b, c, x;
  scanf("%d ", &a);
  scanf("%c", &b);
  for (i = 1; i <= a - 2; i++) scanf("%c", &x);
  scanf("%c", &c);
  if (b == 'S' && c == 'F')
    printf("YES");
  else
    printf("NO");
}
