program main
  implicit none
  integer :: N
  character(len=100) :: s
  integer :: i
  integer :: n_r,n_s
  read(*,*) N
  read(*,*) s(1:N)
  n_r = 0
  n_s = 0
  do i = 1,N
     if (s(i:i) == 'R') then
        n_r = n_r + 1
     else
        n_s = n_s + 1
     end if
  end do
  if (n_r > n_s) then
     write(*,'(a)') 'Yes'
  else
     write(*,'(a)') 'No'
  end if
end program main

; ModuleID = 'FIRModule'
source_filename = "FIRModule"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@_QFEs = internal global [100 x i8] undef
@_QQcl.0a6215326d0bf3cd1171a8902d9e1be4 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4619/source.f\00"
@_QQcl.52 = linkonce constant [1 x i8] c"R"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.596573 = linkonce constant [3 x i8] c"Yes"
@_QQcl.4E6F = linkonce constant [2 x i8] c"No"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.0a6215326d0bf3cd1171a8902d9e1be4, i32 7)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %1, i32 4)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.0a6215326d0bf3cd1171a8902d9e1be4, i32 8)
  %6 = load i32, ptr %1, align 4, !tbaa !3
  %7 = call i32 @llvm.smax.i32(i32 %6, i32 0)
  %8 = zext i32 %7 to i64
  %9 = call i1 @_FortranAioInputAscii(ptr %5, ptr nonnull @_QFEs, i64 %8)
  %10 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %11 = load i32, ptr %1, align 4, !tbaa !3
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph.preheader, label %._crit_edge.thread

.lr.ph.preheader:                                 ; preds = %0
  %13 = zext i32 %11 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %.010 = phi i32 [ 0, %.lr.ph.preheader ], [ %.1, %.lr.ph ]
  %.069 = phi i32 [ 0, %.lr.ph.preheader ], [ %.17, %.lr.ph ]
  %14 = add nsw i64 %indvars.iv, -1
  %15 = getelementptr [100 x [1 x i8]], ptr @_QFEs, i64 0, i64 %14
  %16 = call i32 @_FortranACharacterCompareScalar1(ptr %15, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %17 = icmp eq i32 %16, 0
  %18 = zext i1 %17 to i32
  %.17 = add i32 %.069, %18
  %not. = xor i1 %17, true
  %19 = zext i1 %not. to i32
  %.1 = add i32 %.010, %19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %13
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  %20 = icmp sgt i32 %.17, %.1
  br i1 %20, label %21, label %._crit_edge.thread

21:                                               ; preds = %._crit_edge
  %22 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.0a6215326d0bf3cd1171a8902d9e1be4, i32 19)
  %23 = call i1 @_FortranAioOutputAscii(ptr %22, ptr nonnull @_QQcl.596573, i64 3)
  br label %26

._crit_edge.thread:                               ; preds = %0, %._crit_edge
  %24 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.0a6215326d0bf3cd1171a8902d9e1be4, i32 21)
  %25 = call i1 @_FortranAioOutputAscii(ptr %24, ptr nonnull @_QQcl.4E6F, i64 2)
  br label %26

26:                                               ; preds = %21, %._crit_edge.thread
  %.sink = phi ptr [ %22, %21 ], [ %24, %._crit_edge.thread ]
  %27 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  ret void
}

declare ptr @_FortranAioBeginExternalListInput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare i1 @_FortranAioInputAscii(ptr, ptr, i64) local_unnamed_addr

declare i32 @_FortranACharacterCompareScalar1(ptr, ptr, i64, i64) local_unnamed_addr

declare ptr @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputAscii(ptr, ptr, i64) local_unnamed_addr

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #0

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!llvm.module.flags = !{!0, !1, !2}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{!4, !4, i64 0}
!4 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
