Competitions

# Week 8: December 28 - January 10. Functions. Part 1

# Massive Numbers

The number is called massive if it is represented in the form **a**^**n**, which means **a** raised in power **n**. You need to compare two massive numbers `a`

and ^{b}`c`

, written in the form "^{d}**base**^**exponent**".

Given two massive numbers, print the biggest one.

#### Input

Two massive numbers **a** and **b** in the form "**base**^**exponent**" (**1** ≤ **base**, **exponent** ≤ **1000**). It is known that the values of **a** and **b** are different.

#### Output

Print the biggest number among **a** and **b**.

Input example #1

3^100 2^150

Output example #1

3^100

Input example #2

1^1000 2^1

Output example #2

2^1