Codeforces Round 439 (Div. 2)


A. The Artful Expedient
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 2 3
4 5 6
Output
Karen
Input
5
2 4 6 8 10
9 7 5 3 1
Output
Karen
----------------------------------------------------------------------------------------------------
B. The Eternal Immortality
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 4
Output
2
Input
0 10
Output
0
Input
107 109
Output
2
----------------------------------------------------------------------------------------------------
C. The Intriguing Obsession
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 1 1
Output
8
Input
1 2 2
Output
63
Input
1 3 5
Output
3264
Input
6 2 9
Output
813023575
----------------------------------------------------------------------------------------------------
D. The Overdosing Ubiquity
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 0
Output
9
Input
3 1
2 3
Output
15
Input
2 4
1 2
2 1
1 2
2 1
Output
12
----------------------------------------------------------------------------------------------------
E. The Untended Antiquity
time limit per test: 2 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
5 6 5
1 2 2 4 5
1 3 3 3 3
3 4 4 1 1
2 2 2 4 5
3 1 1 4 4
Output
No
Yes
Input
2500 2500 8
1 549 1279 1263 2189
1 303 795 1888 2432
1 2227 622 2418 1161
3 771 2492 1335 1433
1 2017 2100 2408 2160
3 48 60 798 729
1 347 708 1868 792
3 1940 2080 377 1546
Output
No
Yes
No
----------------------------------------------------------------------------------------------------
