program answer
  implicit none

  integer :: A, B
  integer :: ans

  read(*,*) A, B

  if (12.5*A<10*B) then
     if(10*B<12.5*A+12.5) then
       ans =  10*B
     else
        ans =  -1
     end if
  else
     if (12.5*A<10*B+10) then
        if (mod (A,2)==1) then
           ans = int(12.5*A)+1
        else
           ans = 12.5*A
        end if
     else
        ans =  -1
     end if
  end if
  

  write(*,*) ans
  stop
 end program answer

; 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.08f7f180883ed1a5e2c3fe1345a4fd88 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2213/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.08f7f180883ed1a5e2c3fe1345a4fd88, i32 7)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %1, i32 4)
  %5 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 4)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %7 = load i32, ptr %1, align 4, !tbaa !3
  %8 = sitofp i32 %7 to float
  %9 = fmul contract float %8, 1.250000e+01
  %10 = load i32, ptr %2, align 4, !tbaa !3
  %11 = mul i32 %10, 10
  %12 = sitofp i32 %11 to float
  %13 = fcmp olt float %9, %12
  br i1 %13, label %14, label %17

14:                                               ; preds = %0
  %15 = fadd contract float %9, 1.250000e+01
  %16 = fcmp ogt float %15, %12
  br label %.sink.split

17:                                               ; preds = %0
  %18 = add i32 %11, 10
  %19 = sitofp i32 %18 to float
  %20 = fcmp olt float %9, %19
  br i1 %20, label %21, label %26

21:                                               ; preds = %17
  %22 = and i32 %7, -2147483647
  %23 = icmp eq i32 %22, 1
  %24 = fptosi float %9 to i32
  %25 = add i32 %24, 1
  br label %.sink.split

.sink.split:                                      ; preds = %14, %21
  %.sink4 = phi i32 [ %24, %21 ], [ -1, %14 ]
  %.sink3 = phi i32 [ %25, %21 ], [ %11, %14 ]
  %.sink = phi i1 [ %23, %21 ], [ %16, %14 ]
  %spec.select = select i1 %.sink, i32 %.sink3, i32 %.sink4
  br label %26

26:                                               ; preds = %.sink.split, %17
  %.0 = phi i32 [ -1, %17 ], [ %spec.select, %.sink.split ]
  %27 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.08f7f180883ed1a5e2c3fe1345a4fd88, i32 28)
  %28 = call i1 @_FortranAioOutputInteger32(ptr %27, i32 %.0)
  %29 = call i32 @_FortranAioEndIoStatement(ptr %27)
  %30 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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 @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

attributes #0 = { noreturn }

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