#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);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a, b;
  scanf("%d %d", &a, &b);
  a = (a % 10) * 100 + ((a / 10) % 10) * 10 + ((a / 100) % 10);
  b = (b % 10) * 100 + ((b / 10) % 10) * 10 + ((b / 100) % 10);
  printf("%d\n", a < b ? b : a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
imul   $0x64,%edx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x1c(%rbp),%eax
imul   $0xa,%edx,%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x18(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
imul   $0x64,%edx,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x14(%rbp),%eax
imul   $0xa,%edx,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%eax
add    %edx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ee <main+0xce>
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    11f4 <main+0xd4>
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%esi
lea    0xe08(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
imul   $0x51eb851f,%rax,%rsi
sub    %edx,%eax
imul   $0x64,%eax,%eax
movslq %ecx,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rdx
add    %edi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
mov    %rsi,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rsi
add    %edx,%esi
movslq %esi,%rdx
imul   $0x66666667,%rdx,%rsi
mov    %rsi,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rsi
add    %edi,%esi
add    %esi,%esi
lea    (%rsi,%rsi,4),%esi
sub    %esi,%edx
add    %eax,%edx
lea    (%rdx,%rcx,2),%esi
mov    %esi,0x4(%rsp)
movslq (%rsp),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
imul   $0x51eb851f,%rax,%rdi
sub    %edx,%eax
imul   $0x64,%eax,%r8d
movslq %ecx,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x22,%rdx
add    %eax,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%eax
sub    %eax,%ecx
lea    (%rcx,%rcx,4),%eax
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rdi
add    %ecx,%edi
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rdi
shr    $0x3f,%rdi
sar    $0x22,%rdx
add    %edi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
add    %r8d,%ecx
lea    (%rcx,%rax,2),%eax
mov    %eax,(%rsp)
cmp    %eax,%esi
cmovl  %eax,%esi
lea    0xdc5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = srem i32 %5, 10
%7 = mul nsw i32 %6, 100
%8 = load i32, i32* %2
%9 = sdiv i32 %8, 10
%10 = srem i32 %9, 10
%11 = mul nsw i32 %10, 10
%12 = add nsw i32 %7, %11
%13 = load i32, i32* %2
%14 = sdiv i32 %13, 100
%15 = srem i32 %14, 10
%16 = add nsw i32 %12, %15
store i32 %16, i32* %2
%17 = load i32, i32* %3
%18 = srem i32 %17, 10
%19 = mul nsw i32 %18, 100
%20 = load i32, i32* %3
%21 = sdiv i32 %20, 10
%22 = srem i32 %21, 10
%23 = mul nsw i32 %22, 10
%24 = add nsw i32 %19, %23
%25 = load i32, i32* %3
%26 = sdiv i32 %25, 100
%27 = srem i32 %26, 10
%28 = add nsw i32 %24, %27
store i32 %28, i32* %3
%29 = load i32, i32* %2
%30 = load i32, i32* %3
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %34
32: ; preds = %0
%33 = load i32, i32* %3
br label %36
34: ; preds = %0
%35 = load i32, i32* %2
br label %36
36: ; preds = %34, %32
%37 = phi i32 [ %33, %32 ], [ %35, %34 ]
%38 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %37)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = srem i32 %6, 10
%8 = mul nsw i32 %7, 100
%9 = sdiv i32 %6, 10
%10 = srem i32 %9, 10
%11 = mul nsw i32 %10, 10
%12 = sdiv i32 %6, 100
%13 = srem i32 %12, 10
%14 = add nsw i32 %13, %8
%15 = add nsw i32 %14, %11
store i32 %15, i32* %1
%16 = load i32, i32* %2
%17 = srem i32 %16, 10
%18 = mul nsw i32 %17, 100
%19 = sdiv i32 %16, 10
%20 = srem i32 %19, 10
%21 = mul nsw i32 %20, 10
%22 = sdiv i32 %16, 100
%23 = srem i32 %22, 10
%24 = add nsw i32 %23, %18
%25 = add nsw i32 %24, %21
store i32 %25, i32* %2
%26 = icmp slt i32 %15, %25
%27 = select i1 %26, i32 %25, i32 %15
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %27)
ret i32 0
}