program main
 implicit none
 character*4 s
 read(*,*) s
 if(s(1:1)==s(2:2) .and. s(3:3)==s(4:4) .and. s(2:2)/=s(3:3))then
  write(*,*) 'Yes'
 else if(s(1:1)==s(3:3) .and. s(2:2)==s(4:4) .and. s(2:2)/=s(3:3))then
  write(*,*) 'Yes'
 else if(s(1:1)==s(4:4) .and. s(2:2)==s(3:3) .and. s(2:2)/=s(4:4))then
  write(*,*) 'Yes'
 else
  write(*,*) '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"

@_QQcl.76886883b4d1c5564ddfb8d3aea5b00e = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_3849/source.f\00"
@_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 [4 x i8], align 1
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.76886883b4d1c5564ddfb8d3aea5b00e, i32 4)
  %3 = call i1 @_FortranAioInputAscii(ptr %2, ptr nonnull %1, i64 4)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = getelementptr inbounds [4 x [1 x i8]], ptr %1, i64 0, i64 1
  %6 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull %5, i64 1, i64 1)
  %7 = getelementptr inbounds [4 x [1 x i8]], ptr %1, i64 0, i64 2
  %8 = getelementptr inbounds [4 x [1 x i8]], ptr %1, i64 0, i64 3
  %9 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %7, ptr nonnull %8, i64 1, i64 1)
  %10 = or i32 %9, %6
  %11 = icmp eq i32 %10, 0
  %12 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %5, ptr nonnull %7, i64 1, i64 1)
  %13 = icmp ne i32 %12, 0
  %14 = and i1 %11, %13
  br i1 %14, label %15, label %18

15:                                               ; preds = %0
  %16 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.76886883b4d1c5564ddfb8d3aea5b00e, i32 6)
  %17 = call i1 @_FortranAioOutputAscii(ptr %16, ptr nonnull @_QQcl.596573, i64 3)
  br label %43

18:                                               ; preds = %0
  %19 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull %7, i64 1, i64 1)
  %20 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %5, ptr nonnull %8, i64 1, i64 1)
  %21 = or i32 %20, %19
  %22 = icmp eq i32 %21, 0
  %23 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %5, ptr nonnull %7, i64 1, i64 1)
  %24 = icmp ne i32 %23, 0
  %25 = and i1 %22, %24
  br i1 %25, label %26, label %29

26:                                               ; preds = %18
  %27 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.76886883b4d1c5564ddfb8d3aea5b00e, i32 8)
  %28 = call i1 @_FortranAioOutputAscii(ptr %27, ptr nonnull @_QQcl.596573, i64 3)
  br label %43

29:                                               ; preds = %18
  %30 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %1, ptr nonnull %8, i64 1, i64 1)
  %31 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %5, ptr nonnull %7, i64 1, i64 1)
  %32 = or i32 %31, %30
  %33 = icmp eq i32 %32, 0
  %34 = call i32 @_FortranACharacterCompareScalar1(ptr nonnull %5, ptr nonnull %8, i64 1, i64 1)
  %35 = icmp ne i32 %34, 0
  %36 = and i1 %33, %35
  br i1 %36, label %37, label %40

37:                                               ; preds = %29
  %38 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.76886883b4d1c5564ddfb8d3aea5b00e, i32 10)
  %39 = call i1 @_FortranAioOutputAscii(ptr %38, ptr nonnull @_QQcl.596573, i64 3)
  br label %43

40:                                               ; preds = %29
  %41 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.76886883b4d1c5564ddfb8d3aea5b00e, i32 12)
  %42 = call i1 @_FortranAioOutputAscii(ptr %41, ptr nonnull @_QQcl.4E6F, i64 2)
  br label %43

43:                                               ; preds = %15, %26, %37, %40
  %.sink = phi ptr [ %16, %15 ], [ %27, %26 ], [ %38, %37 ], [ %41, %40 ]
  %44 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  ret void
}

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

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

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

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

declare ptr @_FortranAioBeginExternalListOutput(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}
