program string_transformation
  implicit none
  character(200000) :: s, t
  integer :: n, i, j, a, b
  logical :: x(26,26) = .false.
  read(*,*) s
  read(*,*) t
  n = len_trim(s)
  do i = 1, n
    x(ord(s(i:i)),ord(t(i:i))) = .true.
  end do
  do i = 1, 26
    a = 0
    b = 0
    do j = 1, 26
      if (x(i,j)) a = a+1
      if (x(j,i)) b = b+1
    end do
    if (a > 1 .or. b > 1) then
      write(*,'(a)') "No"
      stop
    end if
  end do
  write(*,'(a)') "Yes"
contains
  integer function ord(s)
    character(1), intent(in) :: s
    ord = ichar(s)-96
  end
end program string_transformation
; 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 [200000 x i8] undef
@_QFEt = internal global [200000 x i8] undef
@_QFEx = internal unnamed_addr global [26 x [26 x i32]] zeroinitializer
@_QQcl.36b1e7cac62228b7ae3d5034306ce1eb = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5509/source.f\00"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.4E6F = linkonce constant [2 x i8] c"No"
@_QQcl.596573 = linkonce constant [3 x i8] c"Yes"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.36b1e7cac62228b7ae3d5034306ce1eb, i32 6)
  %2 = tail call i1 @_FortranAioInputAscii(ptr %1, ptr nonnull @_QFEs, i64 200000)
  %3 = tail call i32 @_FortranAioEndIoStatement(ptr %1)
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.36b1e7cac62228b7ae3d5034306ce1eb, i32 7)
  %5 = tail call i1 @_FortranAioInputAscii(ptr %4, ptr nonnull @_QFEt, i64 200000)
  %6 = tail call i32 @_FortranAioEndIoStatement(ptr %4)
  br label %7

7:                                                ; preds = %0, %7
  %8 = phi i64 [ 199999, %0 ], [ %12, %7 ]
  %9 = getelementptr [200000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %8
  %10 = load i8, ptr %9, align 1, !tbaa !3
  %11 = icmp eq i8 %10, 32
  %12 = add nsw i64 %8, -1
  %13 = icmp ne i64 %8, 0
  %14 = and i1 %11, %13
  br i1 %14, label %7, label %15

15:                                               ; preds = %7
  %16 = shl i64 %8, 32
  %sext = add i64 %16, 4294967296
  %17 = ashr exact i64 %sext, 32
  %spec.select25 = select i1 %11, i64 0, i64 %17
  %18 = icmp sgt i64 %spec.select25, 0
  br i1 %18, label %select.unfold.preheader, label %.preheader.preheader

select.unfold.preheader:                          ; preds = %15
  %xtraiter = and i64 %spec.select25, 1
  %19 = icmp eq i64 %spec.select25, 1
  br i1 %19, label %.preheader.preheader.loopexit.unr-lcssa, label %select.unfold.preheader.new

select.unfold.preheader.new:                      ; preds = %select.unfold.preheader
  %unroll_iter = and i64 %spec.select25, -2
  br label %select.unfold

select.unfold:                                    ; preds = %select.unfold, %select.unfold.preheader.new
  %indvars.iv = phi i64 [ 1, %select.unfold.preheader.new ], [ %indvars.iv.next.1, %select.unfold ]
  %niter = phi i64 [ 0, %select.unfold.preheader.new ], [ %niter.next.1, %select.unfold ]
  %20 = add nsw i64 %indvars.iv, -1
  %21 = getelementptr [200000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %20
  %.unpack.i = load i8, ptr %21, align 1, !tbaa !3
  %22 = zext i8 %.unpack.i to i64
  %23 = add nsw i64 %22, -97
  %24 = getelementptr [200000 x [1 x i8]], ptr @_QFEt, i64 0, i64 %20
  %.unpack.i24 = load i8, ptr %24, align 1, !tbaa !3
  %25 = zext i8 %.unpack.i24 to i64
  %26 = add nsw i64 %25, -97
  %27 = getelementptr [26 x [26 x i32]], ptr @_QFEx, i64 0, i64 %26, i64 %23
  store i32 1, ptr %27, align 4, !tbaa !3
  %28 = getelementptr [200000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %indvars.iv
  %.unpack.i.1 = load i8, ptr %28, align 1, !tbaa !3
  %29 = zext i8 %.unpack.i.1 to i64
  %30 = add nsw i64 %29, -97
  %31 = getelementptr [200000 x [1 x i8]], ptr @_QFEt, i64 0, i64 %indvars.iv
  %.unpack.i24.1 = load i8, ptr %31, align 1, !tbaa !3
  %32 = zext i8 %.unpack.i24.1 to i64
  %33 = add nsw i64 %32, -97
  %34 = getelementptr [26 x [26 x i32]], ptr @_QFEx, i64 0, i64 %33, i64 %30
  store i32 1, ptr %34, align 4, !tbaa !3
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.preheader.preheader.loopexit.unr-lcssa.loopexit, label %select.unfold

.preheader.preheader.loopexit.unr-lcssa.loopexit: ; preds = %select.unfold
  %35 = add nuw nsw i64 %indvars.iv, 1
  br label %.preheader.preheader.loopexit.unr-lcssa

.preheader.preheader.loopexit.unr-lcssa:          ; preds = %.preheader.preheader.loopexit.unr-lcssa.loopexit, %select.unfold.preheader
  %indvars.iv.unr = phi i64 [ 0, %select.unfold.preheader ], [ %35, %.preheader.preheader.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader.preheader, label %select.unfold.epil

select.unfold.epil:                               ; preds = %.preheader.preheader.loopexit.unr-lcssa
  %36 = getelementptr [200000 x [1 x i8]], ptr @_QFEs, i64 0, i64 %indvars.iv.unr
  %.unpack.i.epil = load i8, ptr %36, align 1, !tbaa !3
  %37 = zext i8 %.unpack.i.epil to i64
  %38 = add nsw i64 %37, -97
  %39 = getelementptr [200000 x [1 x i8]], ptr @_QFEt, i64 0, i64 %indvars.iv.unr
  %.unpack.i24.epil = load i8, ptr %39, align 1, !tbaa !3
  %40 = zext i8 %.unpack.i24.epil to i64
  %41 = add nsw i64 %40, -97
  %42 = getelementptr [26 x [26 x i32]], ptr @_QFEx, i64 0, i64 %41, i64 %38
  store i32 1, ptr %42, align 4, !tbaa !3
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %select.unfold.epil, %.preheader.preheader.loopexit.unr-lcssa, %15
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %67
  %indvars.iv38 = phi i64 [ %indvars.iv.next39, %67 ], [ 1, %.preheader.preheader ]
  %43 = add nsw i64 %indvars.iv38, -1
  br label %44

44:                                               ; preds = %44, %.preheader
  %indvars.iv34 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next35.1, %44 ]
  %.01729 = phi i32 [ 0, %.preheader ], [ %.1.1, %44 ]
  %.01828 = phi i32 [ 0, %.preheader ], [ %spec.select.1, %44 ]
  %45 = add nsw i64 %indvars.iv34, -1
  %46 = getelementptr [26 x [26 x i32]], ptr @_QFEx, i64 0, i64 %45, i64 %43
  %47 = load i32, ptr %46, align 4, !tbaa !3
  %.not = icmp ne i32 %47, 0
  %48 = zext i1 %.not to i32
  %spec.select = add i32 %.01828, %48
  %49 = getelementptr [26 x [26 x i32]], ptr @_QFEx, i64 0, i64 %43, i64 %45
  %50 = load i32, ptr %49, align 4, !tbaa !3
  %.not23 = icmp ne i32 %50, 0
  %51 = zext i1 %.not23 to i32
  %.1 = add i32 %.01729, %51
  %52 = getelementptr [26 x [26 x i32]], ptr @_QFEx, i64 0, i64 %indvars.iv34, i64 %43
  %53 = load i32, ptr %52, align 4, !tbaa !3
  %.not.1 = icmp ne i32 %53, 0
  %54 = zext i1 %.not.1 to i32
  %spec.select.1 = add i32 %spec.select, %54
  %55 = getelementptr [26 x [26 x i32]], ptr @_QFEx, i64 0, i64 %43, i64 %indvars.iv34
  %56 = load i32, ptr %55, align 4, !tbaa !3
  %.not23.1 = icmp ne i32 %56, 0
  %57 = zext i1 %.not23.1 to i32
  %.1.1 = add i32 %.1, %57
  %indvars.iv.next35.1 = add nuw nsw i64 %indvars.iv34, 2
  %exitcond37.not.1 = icmp eq i64 %indvars.iv.next35.1, 27
  br i1 %exitcond37.not.1, label %58, label %44

58:                                               ; preds = %44
  %59 = icmp sgt i32 %spec.select.1, 1
  %60 = icmp sgt i32 %.1.1, 1
  %61 = or i1 %59, %60
  br i1 %61, label %62, label %67

62:                                               ; preds = %58
  %63 = tail call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.36b1e7cac62228b7ae3d5034306ce1eb, i32 20)
  %64 = tail call i1 @_FortranAioOutputAscii(ptr %63, ptr nonnull @_QQcl.4E6F, i64 2)
  %65 = tail call i32 @_FortranAioEndIoStatement(ptr %63)
  %66 = tail call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

67:                                               ; preds = %58
  %indvars.iv.next39 = add nuw nsw i64 %indvars.iv38, 1
  %exitcond41.not = icmp eq i64 %indvars.iv.next39, 27
  br i1 %exitcond41.not, label %68, label %.preheader

68:                                               ; preds = %67
  %69 = tail call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.36b1e7cac62228b7ae3d5034306ce1eb, i32 24)
  %70 = tail call i1 @_FortranAioOutputAscii(ptr %69, ptr nonnull @_QQcl.596573, i64 3)
  %71 = tail call i32 @_FortranAioEndIoStatement(ptr %69)
  ret void
}

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read)
define i32 @_QFPord(ptr nocapture readonly %0, i64 %1) local_unnamed_addr #0 {
  %.unpack = load i8, ptr %0, align 1, !tbaa !3
  %3 = zext i8 %.unpack to i32
  %4 = add nsw i32 %3, -96
  ret i32 %4
}

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

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

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

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) }

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