program main
  implicit none
  character(len=100) :: s
  integer :: n, i, r = 0, b = 0

  read *, n
  read *, s

  do i = 1, n
    if (s(i: i) == 'R') then
      r = r + 1
    else
      b = b + 1
    end if
  end do

  if (r > b) then
    print '(A3)', 'Yes'
  else 
    print '(A2)', 'No'
  end if

end program
; 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"

@_QFEb = internal unnamed_addr global i32 0
@_QFEr = internal unnamed_addr global i32 0
@_QFEs = internal global [100 x i8] undef
@_QQcl.be348dbd1983d3b30cf1539af24d34f9 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4618/source.f\00"
@_QQcl.52 = linkonce constant [1 x i8] c"R"
@_QQcl.28413329 = linkonce constant [4 x i8] c"(A3)"
@_QQcl.596573 = linkonce constant [3 x i8] c"Yes"
@_QQcl.28413229 = linkonce constant [4 x i8] c"(A2)"
@_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.be348dbd1983d3b30cf1539af24d34f9, i32 6)
  %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.be348dbd1983d3b30cf1539af24d34f9, i32 7)
  %6 = call i1 @_FortranAioInputAscii(ptr %5, ptr nonnull @_QFEs, i64 100)
  %7 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %8 = load i32, ptr %1, align 4, !tbaa !3
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %10 = zext i32 %8 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 ]
  %11 = add nsw i64 %indvars.iv, -1
  %12 = getelementptr [100 x [1 x i8]], ptr @_QFEs, i64 0, i64 %11
  %13 = call i32 @_FortranACharacterCompareScalar1(ptr %12, ptr nonnull @_QQcl.52, i64 1, i64 1)
  %14 = icmp eq i32 %13, 0
  %_QFEr._QFEb = select i1 %14, ptr @_QFEr, ptr @_QFEb
  %15 = load i32, ptr %_QFEr._QFEb, align 4, !tbaa !3
  %16 = add i32 %15, 1
  store i32 %16, ptr %_QFEr._QFEb, align 4, !tbaa !3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %10
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %17 = load i32, ptr @_QFEr, align 4, !tbaa !3
  %18 = load i32, ptr @_QFEb, align 4, !tbaa !3
  %19 = icmp sgt i32 %17, %18
  br i1 %19, label %20, label %23

20:                                               ; preds = %._crit_edge
  %21 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28413329, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.be348dbd1983d3b30cf1539af24d34f9, i32 18)
  %22 = call i1 @_FortranAioOutputAscii(ptr %21, ptr nonnull @_QQcl.596573, i64 3)
  br label %26

23:                                               ; preds = %._crit_edge
  %24 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28413229, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.be348dbd1983d3b30cf1539af24d34f9, i32 20)
  %25 = call i1 @_FortranAioOutputAscii(ptr %24, ptr nonnull @_QQcl.4E6F, i64 2)
  br label %26

26:                                               ; preds = %20, %23
  %.sink = phi ptr [ %21, %20 ], [ %24, %23 ]
  %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

!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"}
