410536: GYM104037 A Power

Memory Limit:0 MB Time Limit:0 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Powertime limit per test1.0 smemory limit per test512 MBinputpow.inoutputpow.out

You're given integers $$$a$$$ and $$$b$$$,calculate $$$a^b$$$。

But if $$$a^b$$$ exceeds $$$10^9$$$, print '-1'. Otherwise, print the correct value.

Input

Read from file "pow.in"

Single line contains integers $$$a, b$$$.

Output

Output to file "pow.out"

Single line,if $$$a^b$$$ doesn't exceeds $$$10^9$$$, print $$$a^b$$$, otherwise print '-1'.

ExamplesInput
10 9
Output
1000000000
Input
23333 66666
Output
-1
Note

$$$$$$1 \le a, b \le 10^9$$$$$$

Source/Category

加入题单

上一题 下一题 算法标签: