program abc68
 implicit none
 integer(8)::N,ia,ib,c=0
 integer(8),allocatable::a(:),b(:)
 read(*,*)N
 allocate(a(N),b(N))
 do ia=1,N
  read(*,*)a(ia),b(ia)
 end do
 do ib=1,N-2
  if(a(ib)==b(ib).and.a(ib+1)==b(ib+1).and.a(ib+2)==b(ib+2))then
   c=1
   exit
  end if
 end do
 if(c==1)then
  print'(a)',"Yes"
 else
  print'(a)',"No"
 end if
 deallocate(a,b)
end program abc68
; 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"

@_QFEa.0 = internal unnamed_addr global ptr null
@_QFEb.0 = internal unnamed_addr global ptr null
@_QFEc = internal unnamed_addr global i1 false
@_QQcl.163530f166056c185b28a42d7dca09f4 = linkonce constant [72 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_622/source.f\00"
@_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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

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

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i64, align 8
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.163530f166056c185b28a42d7dca09f4, i32 5)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %1, i32 8)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = load i64, ptr %1, align 8, !tbaa !3
  %6 = call i64 @llvm.smax.i64(i64 %5, i64 0)
  %7 = shl i64 %6, 3
  %8 = call ptr @malloc(i64 %7)
  store ptr %8, ptr @_QFEa.0, align 8, !tbaa !7
  %9 = call ptr @malloc(i64 %7)
  store ptr %9, ptr @_QFEb.0, align 8, !tbaa !7
  %10 = icmp sgt i64 %5, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %11 = phi i64 [ %20, %.lr.ph ], [ 1, %0 ]
  %12 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.163530f166056c185b28a42d7dca09f4, i32 8)
  %.unpack305 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %13 = add i64 %11, -1
  %14 = getelementptr i64, ptr %.unpack305, i64 %13
  %15 = call i1 @_FortranAioInputInteger(ptr %12, ptr %14, i32 8)
  %.unpack317 = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  %16 = add i64 %11, -1
  %17 = getelementptr i64, ptr %.unpack317, i64 %16
  %18 = call i1 @_FortranAioInputInteger(ptr %12, ptr %17, i32 8)
  %19 = call i32 @_FortranAioEndIoStatement(ptr %12)
  %20 = add nuw i64 %11, 1
  %exitcond.not = icmp eq i64 %11, %5
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i64, ptr %1, align 8, !tbaa !3
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %21 = phi i64 [ %.pre, %._crit_edge.loopexit ], [ %5, %0 ]
  %22 = add i64 %21, -2
  %23 = icmp sgt i64 %22, 0
  br i1 %23, label %.lr.ph333, label %._crit_edge334

.lr.ph333:                                        ; preds = %._crit_edge
  %.unpack281 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %.unpack293 = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  %24 = add i64 %21, -2
  br label %27

25:                                               ; preds = %27
  %26 = add nuw i64 %.0331, 1
  %exitcond335.not = icmp eq i64 %.0331, %24
  br i1 %exitcond335.not, label %._crit_edge334, label %27

27:                                               ; preds = %.lr.ph333, %25
  %.0331 = phi i64 [ 1, %.lr.ph333 ], [ %26, %25 ]
  %28 = add i64 %.0331, -1
  %29 = getelementptr i64, ptr %.unpack281, i64 %28
  %30 = load i64, ptr %29, align 8, !tbaa !3
  %31 = add i64 %.0331, -1
  %32 = getelementptr i64, ptr %.unpack293, i64 %31
  %33 = load i64, ptr %32, align 8, !tbaa !3
  %34 = icmp eq i64 %30, %33
  %35 = getelementptr i64, ptr %.unpack281, i64 %.0331
  %36 = load i64, ptr %35, align 8, !tbaa !3
  %37 = getelementptr i64, ptr %.unpack293, i64 %.0331
  %38 = load i64, ptr %37, align 8, !tbaa !3
  %39 = icmp eq i64 %36, %38
  %40 = and i1 %34, %39
  %41 = add i64 %.0331, 1
  %42 = getelementptr i64, ptr %.unpack281, i64 %41
  %43 = load i64, ptr %42, align 8, !tbaa !3
  %44 = add i64 %.0331, 1
  %45 = getelementptr i64, ptr %.unpack293, i64 %44
  %46 = load i64, ptr %45, align 8, !tbaa !3
  %47 = icmp eq i64 %43, %46
  %48 = and i1 %40, %47
  br i1 %48, label %.thread, label %25

.thread:                                          ; preds = %27
  store i1 true, ptr @_QFEc, align 1
  br label %49

._crit_edge334:                                   ; preds = %25, %._crit_edge
  %.b.pr = load i1, ptr @_QFEc, align 1
  br i1 %.b.pr, label %49, label %52

49:                                               ; preds = %.thread, %._crit_edge334
  %50 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.163530f166056c185b28a42d7dca09f4, i32 17)
  %51 = call i1 @_FortranAioOutputAscii(ptr %50, ptr nonnull @_QQcl.596573, i64 3)
  br label %55

52:                                               ; preds = %._crit_edge334
  %53 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.163530f166056c185b28a42d7dca09f4, i32 19)
  %54 = call i1 @_FortranAioOutputAscii(ptr %53, ptr nonnull @_QQcl.4E6F, i64 2)
  br label %55

55:                                               ; preds = %49, %52
  %.sink = phi ptr [ %50, %49 ], [ %53, %52 ]
  %56 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  %.unpack = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  call void @free(ptr %.unpack)
  store ptr null, ptr @_QFEa.0, align 8, !tbaa !7
  %.unpack269 = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  call void @free(ptr %.unpack269)
  store ptr null, ptr @_QFEb.0, align 8, !tbaa !7
  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 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.smax.i64(i64, i64) #2

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #2 = { 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"}
!7 = !{!8, !8, i64 0}
!8 = !{!"descriptor member", !5, i64 0}
