program B2019
  implicit none
  integer N, red, blue, i 
  character(100) s
  character(1) R, spl
  R = 'R'
  read(*, *) N
  read(*, *) s
  s = trim(s)
  red = 0
  blue = 0
  do i = 1, N
    spl = s(i:i)
    if (spl == R) then
      red = red + 1
    else
      blue = blue + 1
    end if
  end do

  if (red>blue) then
    write(*, '(A)') 'Yes'
  else
    write(*, '(A)') 'No'
  end if
end program B2019
; 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.52 = linkonce local_unnamed_addr constant [1 x i8] c"R"
@_QQcl.a06391539f8696b58c60ab0ffe578b9a = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4620/source.f\00"
@_QQcl.284129 = 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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #0

define void @_QQmain() local_unnamed_addr {
  %1 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %2 = alloca { ptr, i64, i32, i8, i8, i8, i8 }, align 8
  %3 = alloca i32, align 4
  %4 = alloca [1 x i8], align 1
  %5 = alloca [1 x i8], align 1
  %.unpack = load i8, ptr @_QQcl.52, align 1, !tbaa !3
  store i8 %.unpack, ptr %4, align 1, !tbaa !3
  %6 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.a06391539f8696b58c60ab0ffe578b9a, i32 7)
  %7 = call i1 @_FortranAioInputInteger(ptr %6, ptr nonnull %3, i32 4)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %6)
  %9 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.a06391539f8696b58c60ab0ffe578b9a, i32 8)
  %10 = call i1 @_FortranAioInputAscii(ptr %9, ptr nonnull @_QFEs, i64 100)
  %11 = call i32 @_FortranAioEndIoStatement(ptr %9)
  store ptr @_QFEs, ptr %1, align 8, !tbaa !7
  %.fca.1.gep17 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 1
  store i64 100, ptr %.fca.1.gep17, align 8, !tbaa !7
  %.fca.2.gep18 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep18, align 8, !tbaa !7
  %.fca.3.gep19 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep19, align 4, !tbaa !7
  %.fca.4.gep20 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep20, align 1, !tbaa !7
  %.fca.5.gep21 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep21, align 2, !tbaa !7
  %.fca.6.gep22 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %1, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep22, align 1, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 1
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 2
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, i8 0, i64 16, i1 false)
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !7
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 3
  store i8 0, ptr %.fca.3.gep, align 4, !tbaa !7
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 4
  store i8 40, ptr %.fca.4.gep, align 1, !tbaa !7
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 5
  store i8 2, ptr %.fca.5.gep, align 2, !tbaa !7
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8 }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !7
  %12 = call {} @_FortranATrim(ptr nonnull %2, ptr nonnull %1, ptr nonnull @_QQcl.a06391539f8696b58c60ab0ffe578b9a, i32 9)
  %.fca.0.load = load ptr, ptr %2, align 8, !tbaa !7
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8, !tbaa !7
  %13 = call i64 @llvm.smin.i64(i64 %.fca.1.load, i64 100)
  call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @_QFEs, ptr align 1 %.fca.0.load, i64 %13, i1 false)
  %14 = sub i64 100, %13
  %15 = icmp sgt i64 %14, 0
  br i1 %15, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %uglygep = getelementptr i8, ptr @_QFEs, i64 %13
  call void @llvm.memset.p0.i64(ptr align 1 %uglygep, i8 32, i64 %14, i1 false), !tbaa !3
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %0
  call void @free(ptr %.fca.0.load)
  %16 = load i32, ptr %3, align 4, !tbaa !3
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph64.preheader, label %._crit_edge65.thread

.lr.ph64.preheader:                               ; preds = %._crit_edge
  %18 = zext i32 %16 to i64
  br label %.lr.ph64

.lr.ph64:                                         ; preds = %.lr.ph64.preheader, %.lr.ph64
  %indvars.iv = phi i64 [ 1, %.lr.ph64.preheader ], [ %indvars.iv.next, %.lr.ph64 ]
  %.062 = phi i32 [ 0, %.lr.ph64.preheader ], [ %.1, %.lr.ph64 ]
  %.05661 = phi i32 [ 0, %.lr.ph64.preheader ], [ %.157, %.lr.ph64 ]
  %19 = add nsw i64 %indvars.iv, -1
  %20 = getelementptr [100 x [1 x i8]], ptr @_QFEs, i64 0, i64 %19
  %21 = load i8, ptr %20, align 1
  store i8 %21, ptr %5, align 1
  %22 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %5, ptr nonnull %4, i64 1, i64 1)
  %23 = icmp ne i32 %22, 0
  %24 = zext i1 %23 to i32
  %.157 = add i32 %.05661, %24
  %not. = xor i1 %23, true
  %25 = zext i1 %not. to i32
  %.1 = add i32 %.062, %25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %18
  br i1 %exitcond.not, label %._crit_edge65, label %.lr.ph64

._crit_edge65:                                    ; preds = %.lr.ph64
  %26 = icmp sgt i32 %.1, %.157
  br i1 %26, label %27, label %._crit_edge65.thread

27:                                               ; preds = %._crit_edge65
  %28 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.284129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.a06391539f8696b58c60ab0ffe578b9a, i32 22)
  %29 = call i1 @_FortranAioOutputAscii(ptr %28, ptr nonnull @_QQcl.596573, i64 3)
  br label %32

._crit_edge65.thread:                             ; preds = %._crit_edge, %._crit_edge65
  %30 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.284129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.a06391539f8696b58c60ab0ffe578b9a, i32 24)
  %31 = call i1 @_FortranAioOutputAscii(ptr %30, ptr nonnull @_QQcl.4E6F, i64 2)
  br label %32

32:                                               ; preds = %27, %._crit_edge65.thread
  %.sink = phi ptr [ %28, %27 ], [ %30, %._crit_edge65.thread ]
  %33 = 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 {} @_FortranATrim(ptr, ptr, ptr, i32) local_unnamed_addr

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #1

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 i64 @llvm.smin.i64(i64, i64) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

attributes #0 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!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"}
!7 = !{!8, !8, i64 0}
!8 = !{!"descriptor member", !5, i64 0}
