#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 *, char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
scalar_t__ solve(int, int);
int main(int argc, char **argv) {
  int n, m;
  while (1) {
    n = m = 0;
    scanf("%d %d", &n, &m);
    if (n == 0)
      break;
    printf("%s\n", solve(n, m) ? "Paula" : "Carlos");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xea5(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
cmpl   $0x0,-0x14(%rbp)
jne    1177 <main+0x47>
jmp    11ac <main+0x7c>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <solve@plt>
mov    %rax,%rcx
lea    0xe84(%rip),%rsi
lea    0xe77(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xe64(%rip),%rdi
call   1040 <printf@plt>
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
lea    0xeaf(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1050 <scanf@plt>
mov    (%rsp),%edi
test   %edi,%edi
je     11cf <main+0x9f>
lea    0xea4(%rip),%r13
lea    0xe97(%rip),%rbp
lea    0xe8c(%rip),%r14
lea    0xe7f(%rip),%r15
mov    %rsp,%r12
lea    0x4(%rsp),%rbx
nopl   0x0(%rax)
mov    0x4(%rsp),%esi
call   1030 <solve@plt>
test   %rax,%rax
mov    %rbp,%rsi
cmove  %r13,%rsi
mov    %r14,%rdi
call   1040 <printf@plt>
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1050 <scanf@plt>
mov    (%rsp),%edi
test   %edi,%edi
jne    1190 <main+0x60>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [6 x i8] c"Paula\00"
@.str.3 = [7 x i8] c"Carlos\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %8
8: ; preds = %2, %13
store i32 0, i32* %7
store i32 0, i32* %6
%9 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7)
%10 = load i32, i32* %6
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
br label %21
13: ; preds = %8
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = call i64 @solve(i32 %14, i32 %15)
%17 = icmp ne i64 %16, 0
%18 = zext i1 %17 to i64
%19 = select i1 %17, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0)
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %19)
br label %8
21: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [6 x i8] c"Paula\00"
@.str.3 = [7 x i8] c"Carlos\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
store i32 0, i32* %4
store i32 0, i32* %3
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %20, label %10
10: ; preds = %2, %10
%11 = phi i32 [ %18, %10 ], [ %8, %2 ]
%12 = load i32, i32* %4
%13 = call i64 @solve(i32 %11, i32 %12)
%14 = icmp eq i64 %13, 0
%15 = select i1 %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %15)
store i32 0, i32* %4
store i32 0, i32* %3
%17 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%18 = load i32, i32* %3
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %10
20: ; preds = %10, %2
ret i32 0
}