#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *, char *);
int /*<<< orphan*/ sort(char *, int);
int strlen(char *);
int main() {
  char str1[101], str2[101];
  int i, len;
  scanf("%s%s", str1, str2);
  if (strlen(str1) != strlen(str2)) {
    printf("no");
    return 0;
  }
  len = strlen(str1);
  sort(str1, len);
  sort(str2, len);
  for (i = 0; i < len; i++) {
    if (str1[i] != str2[i]) {
      printf("no");
      return 0;
    }
  }
  printf("yes");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    -0xe0(%rbp),%rdx
lea    0xe9c(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xec(%rbp)
lea    -0xe0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0xec(%rbp),%eax
cmp    %ecx,%eax
je     11ac <main+0x6c>
lea    0xe6a(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    125f <main+0x11f>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xe8(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0xe8(%rbp),%esi
call   1050 <sort@plt>
lea    -0xe0(%rbp),%rdi
mov    -0xe8(%rbp),%esi
call   1050 <sort@plt>
movl   $0x0,-0xe4(%rbp)
mov    -0xe4(%rbp),%eax
cmp    -0xe8(%rbp),%eax
jge    124c <main+0x10c>
movslq -0xe4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
movslq -0xe4(%rbp),%rcx
movsbl -0xe0(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
je     1233 <main+0xf3>
lea    0xde3(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    125f <main+0x11f>
jmp    1238 <main+0xf8>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    11e6 <main+0xa6>
lea    0xdb5(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0xe0,%rsp
lea    0xeae(%rip),%rdi
lea    0x70(%rsp),%rbx
mov    %rsp,%rbp
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebx
mov    %rbp,%rdi
call   1030 <strlen@plt>
lea    0xe87(%rip),%r14
cmp    %eax,%ebx
jne    11d6 <main+0x96>
lea    0x70(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <sort@plt>
mov    %rsp,%rdi
mov    %ebp,%esi
call   1050 <sort@plt>
lea    0xe5c(%rip),%rax
test   %ebp,%ebp
jle    11d3 <main+0x93>
mov    %ebp,%ecx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl 0x70(%rsp,%rdx,1),%ebx
cmp    (%rsp,%rdx,1),%bl
jne    11d6 <main+0x96>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    11c0 <main+0x80>
mov    %rax,%r14
mov    %r14,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [3 x i8] c"no\00"
@.str.2 = [4 x i8] c"yes\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [101 x i8]
%3 = alloca [101 x i8]
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%10 = call i32 @strlen(i8* %9)
%11 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%12 = call i32 @strlen(i8* %11)
%13 = icmp ne i32 %10, %12
br i1 %13, label %14, label %16
14: ; preds = %0
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %49
16: ; preds = %0
%17 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%18 = call i32 @strlen(i8* %17)
store i32 %18, i32* %5
%19 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%20 = load i32, i32* %5
%21 = call i32 @sort(i8* %19, i32 %20)
%22 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%23 = load i32, i32* %5
%24 = call i32 @sort(i8* %22, i32 %23)
store i32 0, i32* %4
br label %25
25: ; preds = %44, %16
%26 = load i32, i32* %4
%27 = load i32, i32* %5
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %47
29: ; preds = %25
%30 = load i32, i32* %4
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = load i32, i32* %4
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 %36
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = icmp ne i32 %34, %39
br i1 %40, label %41, label %43
41: ; preds = %29
%42 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %49
43: ; preds = %29
br label %44
44: ; preds = %43
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 1
store i32 %46, i32* %4
br label %25
47: ; preds = %25
%48 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %1
br label %49
49: ; preds = %47, %41, %14
%50 = load i32, i32* %1
ret i32 %50
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [3 x i8] c"no\00"
@.str.2 = [4 x i8] c"yes\00"
define i32 @main() {
%1 = alloca [101 x i8]
%2 = alloca [101 x i8]
%3 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%6 = call i32 @strlen(i8* %3)
%7 = call i32 @strlen(i8* %4)
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %26
9: ; preds = %0
%10 = call i32 @strlen(i8* %3)
%11 = call i32 @sort(i8* %3, i32 %10)
%12 = call i32 @sort(i8* %4, i32 %10)
%13 = icmp sgt i32 %10, 0
br i1 %13, label %14, label %26
14: ; preds = %9
%15 = zext i32 %10 to i64
br label %18
16: ; preds = %18
%17 = icmp eq i64 %25, %15
br i1 %17, label %26, label %18
18: ; preds = %14, %16
%19 = phi i64 [ 0, %14 ], [ %25, %16 ]
%20 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 %19
%23 = load i8, i8* %22
%24 = icmp eq i8 %21, %23
%25 = add nuw nsw i64 %19, 1
br i1 %24, label %16, label %26
26: ; preds = %16, %18, %9, %0
%27 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %0 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %9 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %18 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %16 ]
%28 = call i32 @printf(i8* dereferenceable(1) %27)
ret i32 0
}