nums = list(map(int, input().split())) max_val = max(nums) square = max_val ** 2 cube = max_val ** 3 print(square) print(cube)