#!/usr/env/bin python import math n = int(input()) ceil = math.ceil(n ** 0.5) xor = 0 for x in range(2, ceil + 1): count = 0 while n % x == 0: n /= x count += 1 if count != 0: print(f"{x}^{count}") xor ^= count if n > 1: xor ^= 1 if xor: print("Alice") else: print("Bob")