#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*/ freopen(char *, char *, int /*<<< orphan*/);
int get(int /*<<< orphan*/);
int /*<<< orphan*/ pow(long long, long long);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, long long *, long long *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  freopen("sumdiv.in", "r", stdin);
  freopen("sumdiv.out", "w+", stdout);
  long long a, b, res = 0, i, j;
  scanf("%I64d %I64d", &a, &b);
  printf("%I64d", get(pow(a, b)) % 9901);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e7b(%rip),%rax
mov    (%rax),%edx
lea    0xe8a(%rip),%rdi
lea    0xe8d(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e4f(%rip),%rax
mov    (%rax),%edx
lea    0xe7a(%rip),%rdi
lea    0xe7e(%rip),%rsi
call   1040 <freopen@plt>
movq   $0x0,-0x28(%rbp)
lea    0xe6d(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1060 <scanf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <pow@plt>
mov    %eax,%edi
call   1050 <get@plt>
mov    $0x26ad,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2e8d(%rip),%rax
mov    (%rax),%edx
lea    0xe9c(%rip),%rdi
lea    0xe9f(%rip),%rsi
call   1040 <freopen@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edx
lea    0xe8c(%rip),%rdi
lea    0xe90(%rip),%rsi
call   1040 <freopen@plt>
lea    0xe87(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1060 <scanf@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1070 <pow@plt>
mov    %eax,%edi
call   1050 <get@plt>
movslq %eax,%rsi
imul   $0x34f3fa1b,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x2b,%rax
add    %ecx,%eax
imul   $0x26ad,%eax,%eax
sub    %eax,%esi
lea    0xe42(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"sumdiv.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [11 x i8] c"sumdiv.out\00"
@.str.3 = [3 x i8] c"w+\00"
@stdout = global i32 0
@.str.4 = [12 x i8] c"%I64d %I64d\00"
@.str.5 = [6 x i8] c"%I64d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* @stdin
%12 = call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* @stdout
%14 = call i32 @freopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %13)
store i64 0, i64* %8
%15 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i64* %6, i64* %7)
%16 = load i64, i64* %6
%17 = load i64, i64* %7
%18 = call i32 @pow(i64 %16, i64 %17)
%19 = call i32 @get(i32 %18)
%20 = srem i32 %19, 9901
%21 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"sumdiv.in\00"
@.str.1 = [2 x i8] c"r\00"
@stdin = global i32 0
@.str.2 = [11 x i8] c"sumdiv.out\00"
@.str.3 = [3 x i8] c"w+\00"
@stdout = global i32 0
@.str.4 = [12 x i8] c"%I64d %I64d\00"
@.str.5 = [6 x i8] c"%I64d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = alloca i64
%5 = load i32, i32* @stdin
%6 = tail call i32 @freopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stdout
%8 = tail call i32 @freopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = bitcast i64* %3 to i8*
%10 = bitcast i64* %4 to i8*
%11 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i64* %3, i64* %4)
%12 = load i64, i64* %3
%13 = load i64, i64* %4
%14 = call i32 @pow(i64 %12, i64 %13)
%15 = call i32 @get(i32 %14)
%16 = srem i32 %15, 9901
%17 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %16)
ret i32 0
}