RoAlgo Weekly Contest #1 | inmultire

This was the problem page during the contest. Access the current page here.
Time limit: 1s Memory limit: 64MB Input: Output:

Task

After he memorized the multiplication table, Gigel can now multiply two integers between 11 and 99 (including 11 and 99), without being able to perform other multiplications.

Given two integers aa and bb, figure out whether Gigel can multiply them or not. If he can do it, print (aba \cdot b), otherwise print 1-1.

Input data

The first line of the input contains two integers, aa and bb.

Output data

The output will contain a single integer, (aba \cdot b) if Gigel can multiply them, otherwise print 1-1.

Constraints and clarifications

  • 1a,b201 \leq a, b \leq 20

Example 1

stdin

7 6

stdout

42

Example 2

stdin

5 12

stdout

-1

Log in or sign up to be able to send submissions!